i need a quick script for a forum in firefox that basically loads the page, finds in the source of the page a URL with the words pid=000000 and returns whatever the string 000000 has in it and forms a button or link with a new modified URL using that numberhow hard would that be?
3/12/2008 7:30:00 AM
very easysomething to the effect of
var hyperlinks = document.getElementsByTagName('a');for (var i = 0; i < hyperlinks.length; i++){ if (hyperlinks[i].href.match(/pid=(.*)/) != null) { var newlink = document.createElement('a'); newlink.href = 'http://somewebsite.com/index.php?pid=' + hyperlinks[i].href.match(/pid=(.*)/)[1]; newlink.innerHTML = 'link text'; document.getElementById('whereyouwanttoputit').appendChild(newlink); break; }}
3/12/2008 8:14:25 AM
thanks i'll try that
3/12/2008 3:28:41 PM