Merge f570ae3bc950fedf793777c13b36686105b7894c into ee0375473564956609f207f71b1343c83152a6b8

This commit is contained in:
Alexander Bogdanov 2019-11-26 20:09:26 +01:00 committed by GitHub
commit 099f5d0a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,13 +6,20 @@
* @return {void} - * @return {void} -
*/ */
function openInPopup(url, width, height) { function openInPopup(url, width, height) {
browser.windows.create({ if(browser.windows) {
url, browser.windows.create({
type: 'popup', url,
allowScriptsToClose: true, type: 'popup',
width, allowScriptsToClose: true,
height, width,
}); height,
});
}else if(browser.tabs){
browser.tabs.create({
active: true,
url: url
})
}
} }
/** /**