From ce760f8f2d836a7be6e72a35020c5fa9271b2052 Mon Sep 17 00:00:00 2001 From: alastairR Date: Thu, 21 Nov 2019 15:19:36 +1300 Subject: [PATCH] NZ Herald fix, missing curly brace --- contentScript.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contentScript.js b/contentScript.js index b2a0487..c158dbc 100644 --- a/contentScript.js +++ b/contentScript.js @@ -174,13 +174,13 @@ function removeDOMElement(...elements) { } } -function removeClassesByPrefix(el, prefix) -{ +function removeClassesByPrefix(el, prefix) { for (let i = el.classList.length - 1; i >= 0; i--) { - if(el.classList[i].startsWith(prefix)) { - el.classList.remove(el.classList[i]); + if(el.classList[i].startsWith(prefix)) + el.classList.remove(el.classList[i]); } - } + } +} function pageContains(selector, text) { let elements = document.querySelectorAll(selector);