Using browser.tabs to open Shaarli on mobile
This commit is contained in:
parent
ee03754735
commit
f570ae3bc9
@ -6,6 +6,7 @@
|
|||||||
* @return {void} -
|
* @return {void} -
|
||||||
*/
|
*/
|
||||||
function openInPopup(url, width, height) {
|
function openInPopup(url, width, height) {
|
||||||
|
if(browser.windows) {
|
||||||
browser.windows.create({
|
browser.windows.create({
|
||||||
url,
|
url,
|
||||||
type: 'popup',
|
type: 'popup',
|
||||||
@ -13,6 +14,12 @@ function openInPopup(url, width, height) {
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
});
|
});
|
||||||
|
}else if(browser.tabs){
|
||||||
|
browser.tabs.create({
|
||||||
|
active: true,
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user