diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-05-24 14:01:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 14:01:21 -0400 |
commit | 6dd6af05e1ed3e0da4091af073c38e1d8ec0268d (patch) | |
tree | 7262add632fac645ca0481abbb63efb3b8291bb8 /ext/bg/js/anki-note-builder.js | |
parent | 3c4c82dcfc66a1b24a3df3d4b15283235c72cf66 (diff) |
Update background global object usage (#556)
* Omit global window object for scripts used on the background page
* Validate document exists before using
* Remove dom.js from background.html
Diffstat (limited to 'ext/bg/js/anki-note-builder.js')
-rw-r--r-- | ext/bg/js/anki-note-builder.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js index 76199db7..31e67394 100644 --- a/ext/bg/js/anki-note-builder.js +++ b/ext/bg/js/anki-note-builder.js @@ -155,7 +155,7 @@ class AnkiNoteBuilder { } static arrayBufferToBase64(arrayBuffer) { - return window.btoa(String.fromCharCode(...new Uint8Array(arrayBuffer))); + return btoa(String.fromCharCode(...new Uint8Array(arrayBuffer))); } static stringReplaceAsync(str, regex, replacer) { |