Skip to content

Commit

Permalink
🎨 Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
younesaassila committed Jun 19, 2023
1 parent b1204d5 commit c0171f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content/content.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pageScript from "url:../page/page.ts";
import workerScript from "url:../page/worker.ts";
import pageScriptURL from "url:../page/page.ts";
import workerScriptURL from "url:../page/worker.ts";
import { twitchChannelNameRegex } from "../common/ts/regexes";
import { getStreamStatus, setStreamStatus } from "../common/ts/streamStatus";
import store from "../store";
Expand All @@ -16,9 +16,9 @@ window.addEventListener("message", onMessage);
function injectPageScript() {
// From https://stackoverflow.com/a/9517879
const script = document.createElement("script");
script.src = pageScript; // src/page/page.ts
script.src = pageScriptURL; // (src/page/page.ts)
script.dataset.params = JSON.stringify({
workerScriptURL: workerScript, // src/page/worker.ts
workerScriptURL: workerScriptURL, // (src/page/worker.ts)
});
script.onload = () => script.remove();
// ---------------------------------------
Expand Down

0 comments on commit c0171f3

Please sign in to comment.