summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-08-01 23:27:00 +0530
committerArun Isaac2017-08-01 23:27:00 +0530
commit75f2b23b2dbfed1f4da6a3cd8a03636f95271a0b (patch)
tree93a77e430984cc1483502f5fd07198b55d305db1
parent143d46d79b098c722ecf82201e81ba334c47ed30 (diff)
downloadyoutube-noscript-shim-75f2b23b2dbfed1f4da6a3cd8a03636f95271a0b.tar.gz
youtube-noscript-shim-75f2b23b2dbfed1f4da6a3cd8a03636f95271a0b.tar.lz
youtube-noscript-shim-75f2b23b2dbfed1f4da6a3cd8a03636f95271a0b.zip
Add stylesheet using `createElement'.
* viewtube.js: Create a link element for stylesheet using `createElement'.
-rw-r--r--viewtube.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/viewtube.js b/viewtube.js
index 7b45b05..e41b167 100644
--- a/viewtube.js
+++ b/viewtube.js
@@ -169,12 +169,10 @@
// =====YouTube===== //
// Add stylesheet
- document.head.appendChild(createElement("link", {rel: "stylesheet", type: "text/css", href: browser.extension.getURL("viewtube.css")}));
-
- /* Redirect Categories */
- if (page.url.indexOf('gaming.youtube.com') != -1) {
- page.win.location.href = page.url.replace('gaming', 'www');
- }
+ createElement("link", {rel: "stylesheet",
+ type: "text/css",
+ href: browser.extension.getURL("viewtube.css")},
+ document.head);
/* Video Availability */
var ytVideoUnavailable = document.querySelector("#player-unavailable");