Using Firebug I have extracted all the links of a web page using:
var links = document.getElementsByTagName("a");
for(var i=0; i<links.length; i++) {
console.log(links[i].href);
}
now all the links are in the console and they are in the format:
javascript:tenderLog1('abcd.pdf','test','23');
Now I want to pass this string output as a Firebug js command so that all the links get opened automatically.
Is there any function to pass js variable as a Firebug command?
tenderLog1, and useevalon that string. Another method is (NO REGEXES!) to get the contents within the parentheses, wrap it in[,], and useJSON.parse.javascript:tenderLog1('abcd.pdf','test','23');is not a "firebug command", whatever that would be, so there would not be a way to "pass it" as such. It is an URL. It really makes no sense; you can open URLs usingwindow.open, though I think some browsers restrictjavascript:URLs nowadays.