From 75f2b23b2dbfed1f4da6a3cd8a03636f95271a0b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 1 Aug 2017 23:27:00 +0530 Subject: Add stylesheet using `createElement'. * viewtube.js: Create a link element for stylesheet using `createElement'. --- viewtube.js | 10 ++++------ 1 file 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"); -- cgit v1.2.3