aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-06-27 10:19:23 +0530
committerArun Isaac2017-06-27 10:19:23 +0530
commite685ece795ce2ea5db7bd18852e987c412e6d3a0 (patch)
treef0416c529208284f2ae9af9c81c52483a07df32b
parent019c1de94c0b15b1f1c5af3b401ee27bcf3a6c86 (diff)
downloadyoutube-noscript-shim-e685ece795ce2ea5db7bd18852e987c412e6d3a0.tar.gz
youtube-noscript-shim-e685ece795ce2ea5db7bd18852e987c412e6d3a0.tar.lz
youtube-noscript-shim-e685ece795ce2ea5db7bd18852e987c412e6d3a0.zip
Iterate over NodeList.
* youtube-noscript-shim.user.js: Iterate over NodeList without first converting it to an Array.
-rw-r--r--youtube-noscript-shim.user.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube-noscript-shim.user.js b/youtube-noscript-shim.user.js
index 92b189f..6468e78 100644
--- a/youtube-noscript-shim.user.js
+++ b/youtube-noscript-shim.user.js
@@ -51,7 +51,7 @@ function toggleBooleanAttributes (selector, ...attributes) {
}
// Load thumbnails
-Array.from(document.querySelectorAll("img[data-thumb]")).forEach(function (img) {
+document.querySelectorAll("img[data-thumb]").forEach(function (img) {
img.setAttribute("src", img.getAttribute("data-thumb"));
});