summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--youtube-noscript-shim.user.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube-noscript-shim.user.js b/youtube-noscript-shim.user.js
index adaa112..fdd6e91 100644
--- a/youtube-noscript-shim.user.js
+++ b/youtube-noscript-shim.user.js
@@ -60,6 +60,12 @@ function attachEventListener (selector, eventType, listener) {
});
}
+// Remove all of YouTube's javascript. Thus, this addon does not
+// depend on NoScript being installed.
+document.querySelectorAll("script").forEach(function (script) {
+ script.remove();
+});
+
// Load thumbnails
document.querySelectorAll("img[data-thumb]").forEach(function (img) {
img.setAttribute("src", img.getAttribute("data-thumb"));