Change all "hidden" tags in HTML to "shown"
|
|
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,
|
|
|
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';
}
|
|
|
this isn't the same as joe's, but maybe you'd be interested in it. |
|
|
Thanks Joe. The script works perfectly. |
