NZ Herald fix, missing curly brace

master
alastairR 2019-11-21 15:19:36 +13:00 committed by GitHub
parent 0baba05a75
commit 44049b913d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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);