According to my requirement, I need to create a Google Chrome extension that opens several links (25+) with one click on different tabs of the same chrome window. The code worked fine until Chrome 18. Now I use chrome 24 and this code stops working. I just saved all the links in an array and opened them using a for loop as follows:
for(var i = 0; i<links.length; i++) { var tablink = links[i]; if(links[i] != "") { tablink = *"somedomain"* + tablink; setTimeout(window.open(tablink), 500); } }
As a result, only two links were opened in the tabs, and the rest will be open in different chrome windows. What should I do to overcome this?
Edit # 1
In manifest file
"content_scripts": [ { "matches": ["http://*/*", "https://*/*"], "js": ["script.js", "jquery.js", "dialog.js"] } ], "permissions": [ "tabs", "http://*/*", "https://*/*" ],
The code specified first is in dialog.js
source share