javascript - open multiple links in chrome at once as new tabs -
i came across in opening multiple links @ 1 time in google chrome in new tab failed.
problems: 1. blocked popup 2. open in new windows instead of tab after user allowed popup
with http://plnkr.co/edit/zvaefssh4o4qdycsungd?p=preview i'm able open multiple links @ 1 time in ff.
i thought of giving came across find way in https://chrome.google.com/webstore/detail/linkclump/lfpjkncokllnfokkgpkobnkbkmelfefj?hl=en
i tried utilize setinterval seek open links 1 1 didn't work.
you can in vanilla javascript:
<html> <head> <script type="text/javascript"> function open_win() { window.open("http://www.java2s.com/") window.open("http://www.java2s.com/") } </script> </head> <body> <form> <input type=button value="open windows" onclick="open_win()"> </form> </body> </html>
here more chrome-specific implementation (if popup blockers giving difficulty):
var linkarray = []; // links (var = 0; < linkarray.length; i++) { // open each link in current window chrome.tabs.create({ url: linkarray[i] }); }
here documentation: https://developer.chrome.com/extensions/tabs
javascript jquery angularjs google-chrome
No comments:
Post a Comment