I have an HTML web page wherein I need to find out all the elements having the display:none
and style them to display:block
using a script, which I can write in console or using Firebug.
There is already a script present for showing all the hidden elements in form tags. I need a similar script for display:none
to display:block
.
var snapHidden = document.evaluate("//input[@type='hidden']",
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = snapHidden.snapshotLength - 1; i >= 0; i--) {
var elmHidden = snapHidden.snapshotItem(i);
elmHidden.style.MozOutline = '1px dashed #666';
elmHidden.type = 'text';
elmHidden.title = 'Hidden field "' +
(elmHidden.name || elmHidden.id) + '"';
}