Fixed SOMtonight not working after login
This commit is contained in:
parent
40a469de0e
commit
faeffc41e6
@ -7,6 +7,14 @@ function changeSlogan(message)
|
|||||||
} else {
|
} else {
|
||||||
tonight = message[0];
|
tonight = message[0];
|
||||||
slogans = message[1];
|
slogans = message[1];
|
||||||
|
|
||||||
|
// Set theme
|
||||||
|
console.log(tonight);
|
||||||
|
if (tonight) {
|
||||||
|
var cssUrl = browser.runtime.getURL("content/css/index.css");
|
||||||
|
var cssTag = `<link rel='stylesheet' href='${cssUrl}'>`;
|
||||||
|
document.head.innerHTML += cssTag;
|
||||||
|
}
|
||||||
|
|
||||||
// Select random slogan
|
// Select random slogan
|
||||||
console.log(`Loaded ${slogans.length} slogans`);
|
console.log(`Loaded ${slogans.length} slogans`);
|
||||||
@ -44,14 +52,6 @@ function changeSlogan(message)
|
|||||||
|
|
||||||
// Add a little credit
|
// Add a little credit
|
||||||
document.querySelectorAll('footer > span')[0].innerHTML = "Somtodayn't is een add-on door McArn.";
|
document.querySelectorAll('footer > span')[0].innerHTML = "Somtodayn't is een add-on door McArn.";
|
||||||
|
|
||||||
// Set theme
|
|
||||||
console.log(tonight);
|
|
||||||
if (tonight) {
|
|
||||||
var cssUrl = browser.runtime.getURL("content/css/index.css");
|
|
||||||
var cssTag = `<link rel='stylesheet' href='${cssUrl}'>`;
|
|
||||||
document.body.innerHTML += cssTag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user