Using browser.tabs to open Shaarli on mobile

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

View File

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