More robust setting checking for banners
parent
fbb923635f
commit
f8b085ced1
|
@ -262,8 +262,12 @@ function main() {
|
||||||
if (site) {
|
if (site) {
|
||||||
// Get user's settings for the wiki
|
// Get user's settings for the wiki
|
||||||
let id = site['id'];
|
let id = site['id'];
|
||||||
let settings = storage.wikiSettings || {};
|
let siteSetting = 'alert';
|
||||||
let siteSetting = settings[id] || storage.defaultWikiAction || 'alert';
|
if (storage.wikiSettings && storage.wikiSettings[id]) {
|
||||||
|
siteSetting = storage.wikiSettings[id];
|
||||||
|
} else if (storage.defaultWikiAction) {
|
||||||
|
siteSetting = storage.defaultWikiAction;
|
||||||
|
}
|
||||||
// Notify if enabled for the wiki:
|
// Notify if enabled for the wiki:
|
||||||
if (siteSetting === 'alert') {
|
if (siteSetting === 'alert') {
|
||||||
// Get article name from the end of the URL;
|
// Get article name from the end of the URL;
|
||||||
|
|
Loading…
Reference in New Issue