diff options
author | Arun Isaac | 2017-07-05 14:41:23 +0530 |
---|---|---|
committer | Arun Isaac | 2017-07-05 14:54:29 +0530 |
commit | 42c5b04e44f4e63aa5a039e9fac8b18ef71a3898 (patch) | |
tree | 641bf85ac030e7b4111bf96e0afc443c0a5a74ec | |
parent | d303c85013b3cc18298360380407b38bd64daa41 (diff) | |
download | youtube-noscript-shim-42c5b04e44f4e63aa5a039e9fac8b18ef71a3898.tar.gz youtube-noscript-shim-42c5b04e44f4e63aa5a039e9fac8b18ef71a3898.tar.lz youtube-noscript-shim-42c5b04e44f4e63aa5a039e9fac8b18ef71a3898.zip |
Remove dependence on NoScript.
* youtube-noscript-shim.user.js: Remove YouTube's javascript without
depending on NoScript to do it.
-rw-r--r-- | youtube-noscript-shim.user.js | 6 |
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")); |