I am trying to open links using javascript on the address-bar of my browser google chrome.
This is the code I'm using:
javascript: var aTags = document.getElementsByTagName("a");
for(i=0;i<aTags.length;i++){
window.open(aTags[i].href);
}
For some reason this open only, in a new tab, the last link in aTags
.
Thanks!
Most browsers, Chrome included, take steps to prevent sites from spamming the user with large numbers of new windows. This prevents you from achieving what you are trying to do.
You need a browser extension to bypass that limitation.
Here are some written by other people: