fix alert after saving settings on firefox and chrome
This commit is contained in:
parent
d5a0c35848
commit
ea8d270a9f
|
@ -72,8 +72,12 @@ async function saveOptions() {
|
||||||
}
|
}
|
||||||
await setOptions(opts)
|
await setOptions(opts)
|
||||||
|
|
||||||
// hmm seems that regular alert() doesn't work in chrome anymore
|
// NOTE: seems that alert() only works here when we use open_in_tab: true for settings page
|
||||||
chrome.extension.getBackgroundPage().alert('Saved!')
|
// when open_in_tab: false, then
|
||||||
|
// in chrome browser.extension.getBackgroundPage().alert works
|
||||||
|
// in firefox that doesn't work, seems that it refuses to alert from bg page
|
||||||
|
// so it seems easier to just always use opne_in_tab: true for setgings page
|
||||||
|
alert('Saved!')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
"persistent": false
|
"persistent": false
|
||||||
},
|
},
|
||||||
"options_ui": {
|
"options_ui": {
|
||||||
"page": "options.html"
|
"page": "options.html",
|
||||||
|
"open_in_tab": false
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons": {
|
||||||
"128": "img/unicorn.png"
|
"128": "img/unicorn.png"
|
||||||
|
|
Loading…
Reference in a new issue