Fix default theme not being correct
This commit is contained in:
parent
dbb51e0f46
commit
60777b9b1f
@ -22,12 +22,14 @@ const options = {
|
|||||||
notifyAllMessages: false,
|
notifyAllMessages: false,
|
||||||
showSeconds: false,
|
showSeconds: false,
|
||||||
statusMessages: "condensed",
|
statusMessages: "condensed",
|
||||||
theme: $("#theme").prop("href").replace(/^themes\/(.*).css$/, "$1"), // Extracts default theme name, set on the server configuration
|
theme: $("#theme").prop("href").match(/themes\/(.*?)\.css$/), // TODO: Make this a data attribute in v3
|
||||||
media: true,
|
media: true,
|
||||||
userStyles: userStyles.text(),
|
userStyles: userStyles.text(),
|
||||||
};
|
};
|
||||||
let userOptions = JSON.parse(storage.get("settings")) || {};
|
let userOptions = JSON.parse(storage.get("settings")) || {};
|
||||||
|
|
||||||
|
options.theme = options.theme ? options.theme[1] : "example"; // TODO: Remove in v3
|
||||||
|
|
||||||
for (const key in options) {
|
for (const key in options) {
|
||||||
if (userOptions[key] !== undefined) {
|
if (userOptions[key] !== undefined) {
|
||||||
options[key] = userOptions[key];
|
options[key] = userOptions[key];
|
||||||
|
Loading…
Reference in New Issue
Block a user