diff options
Diffstat (limited to 'data/lib')
-rw-r--r-- | data/lib/bugzillaDOMFunctions.js | 24 | ||||
-rw-r--r-- | data/lib/bzpage.js | 7 |
2 files changed, 16 insertions, 15 deletions
diff --git a/data/lib/bugzillaDOMFunctions.js b/data/lib/bugzillaDOMFunctions.js index 0f7e1e0..7d9bca5 100644 --- a/data/lib/bugzillaDOMFunctions.js +++ b/data/lib/bugzillaDOMFunctions.js @@ -348,26 +348,28 @@ function getCCList () { function killNodes(doc, target, remove) { var victimElements = []; - target.forEach(function(x) { - var targetNode = doc.querySelector(x); - if (targetNode) { - if (remove) { - victimElements.push([x,targetNode]); + if (target.forEach) { + target.forEach(function(x) { + var targetNode = doc.querySelector(x); + if (targetNode) { + if (remove) { + victimElements.push([x,targetNode]); + } + else { + targetNode.style.display = "none"; + } } - else { - targetNode.style.display = "none"; - } - } - }); + }); + } var elem = {}; // Don't run victimElements.forEach here as we are effectively // removing its members. for(var i = 0, ii = victimElements.length; i < ii; i++) { elem = victimElements[i]; + console.myDebug("Killing element " + elem[0]); try { elem[1].parentNode.removeChild(elem[1]); -// elem[1].style.backgroundColor = "red"; } catch (e if e instanceof TypeError) { console.error("Cannot remove: " + elem[0]); diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js index 7b8a764..e34f38d 100644 --- a/data/lib/bzpage.js +++ b/data/lib/bzpage.js @@ -314,13 +314,12 @@ function generateButtons (pkgs, kNodes) { // constantData etc. // are finally defined and available. if (RHBZinit) { - console.log("call RHBZinit!"); RHBZinit(); } -// if (tweakBugzilla) { -// tweakBugzilla(document, constantData); -// } + if (tweakBugzilla) { + tweakBugzilla(document, constantData); + } } function setConfigurationButton () { |