This only happens from inside the app window.
If you call window.open
from the background page, it will open in Chrome.
So, send it to your background page:
// app window
function openInChrome(url) {
chrome.runtime.sendMessage({action: "openURL", url: url});
}
// background
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
if(message.action == "openURL") window.open(message.url);
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…