Skip to content

Commit

Permalink
Fix functioning on firefox, probably manifest v3 behavior differences #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Jan 6, 2024
1 parent adb0722 commit 0938895
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/inject.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Injects the main script. This is necessary in order to bind a
// keyhandler.

const browser = window.browser || window.chrome;
function inject(scriptName) {
const scriptEl = document.createElement('script');
scriptEl.setAttribute('src', browser.runtime.getURL(scriptName));
scriptEl.setAttribute('src', chrome.runtime.getURL(scriptName));
// In testing doesn't seem to be necessary, but may lead to more
// predictable execution order.
scriptEl.setAttribute('defer', 'defer');
Expand Down

0 comments on commit 0938895

Please sign in to comment.