From e685ece795ce2ea5db7bd18852e987c412e6d3a0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 27 Jun 2017 10:19:23 +0530 Subject: Iterate over NodeList. * youtube-noscript-shim.user.js: Iterate over NodeList without first converting it to an Array. --- youtube-noscript-shim.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); }); -- cgit v1.2.3