renaming nad cleanup

This commit is contained in:
2022-09-03 12:16:01 +03:00
parent faba04d67f
commit 0ca9c65b60
6 changed files with 257 additions and 225 deletions

View File

@@ -1,8 +1,4 @@
(function twitchNotes() {
if (!chrome) {
return;
}
const head = document.getElementsByTagName("head")[0];
if (!head) {
return;
@@ -11,16 +7,18 @@
if (!document.querySelector("script#twitchNotesScript")) {
const script = document.createElement("script");
script.type = "text/javascript";
script.src = chrome.runtime.getURL("twitchnotes.js");
script.src = chrome.runtime.getURL("twitch-notes.js");
script.id = "twitchNotesScript";
head.appendChild(script);
}
if (!document.querySelector("style#twitchNotesStyle")) {
const style = document.createElement("style");
style.src = chrome.runtime.getURL("twitchnotes.css");
const style = document.createElement("link");
style.setAttribute("href", chrome.runtime.getURL("twitch-notes.css"));
style.setAttribute("type", "text/css");
style.setAttribute("rel", "stylesheet");
style.setAttribute("crossorigin", "anonymous");
style.id = "twitchNotesStyle";
head.appendChild(style);
}
})();