I'm making a Chrome extension that will open the first few links of a particular webpage in tabs. All of these pages contain a SWF and I would like that to start loading when the tab is created, while the original tab remains active. But, right now, all of the content except the SWF loads fine, but the SWFs don't start loading until you manually click on the tab, which sort defeats the purpose of this particular extension.
I know this is a feature of Chrome, but I was wondering if there is a way to go around it or toggle it off.
This is the code I'm using in my background.js
file to create new tabs for a handful of URLs:
function openTabs(urls, waitTime){
if(urls.length > 0){
chrome.tabs.create({ url: urls.shift(), active: false});
setTimeout(function(){
openTabs(urls);
}, waitTime);
}
}
Based on initial searching, I wondered if these tabs were being discarded to save memory but chrome://discards/ shows that they have not been.
One possible work-around would be to use a wait time of a couple of seconds and start each tab as active to give the Flash player time to start loading and then switch back to the original active tab when all tabs have been opened, but I'd like to avoid that if possible because it seems annoying to the user.
Per @Teyam's suggestion I tried setting the wmode
param to window
for the Flash player, but that didn't do the trick, unfortunately.
Is there a way I could force Flash to start loading when I create a new inactive tab?