Change all "hidden" tags in HTML to "shown"

Subscribe to Change all "hidden" tags in HTML to "shown" 4 posts, 3 voices

 
badHobbit User

It's easy to change the "hidden" tags in a webpage to "shown" with something like Firebug, but it takes some time and has to be done each time the page is reloaded. From what I've seen you people do with the userscripts, I was wondering if any of you code writers out there would be willing to make this. It doesn't have a huge purpose but I think it will have it's applications for each user. Thank you so much for your time,
BadHobbit

 
JoeSimmons Scriptwright

If you meant input boxes that have the type=hidden, then this will work for you...

// XPath but the array returned is a normal array[x]
// Syntax: $x("//a", 7);
function $x(p, type) {
  var i, arr = [], t = type || 6, xpr = document.evaluate(p,document,null,t,null);
  for (i = 0; item = xpr.snapshotItem(i); i++) {arr.push(item);}
  return arr;
}
var hidden=$x("//input[@type='hidden']");
for(var i=0; i<hidden.length; i++) {
hidden[i].type = 'text';
}

 
avg Scriptwright

this isn't the same as joe's, but maybe you'd be interested in it.

 
badHobbit User

Thanks Joe. The script works perfectly.