diff --git a/public/scripts/themes/theme-switcher.js b/public/scripts/themes/theme-switcher.js index eab279348d..dd30ff8785 100644 --- a/public/scripts/themes/theme-switcher.js +++ b/public/scripts/themes/theme-switcher.js @@ -4,8 +4,8 @@ document.addEventListener("DOMContentLoaded", function () { // Load saved theme from local storage const savedTheme = localStorage.getItem("theme"); if (savedTheme) { - const safeTheme = encodeURIComponent(savedTheme); - themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap.min.css`; + const safeTheme = ((savedTheme != 'default') ? encodeURIComponent(savedTheme) : encodeURIComponent('..')); + themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap-min.css`; } // Initialize Select2 on all select elements with the 'select2' class diff --git a/public/styles/themes/cerulean/bootstrap.min.css b/public/styles/themes/cerulean/bootstrap-min.css similarity index 100% rename from public/styles/themes/cerulean/bootstrap.min.css rename to public/styles/themes/cerulean/bootstrap-min.css diff --git a/public/styles/themes/cosmo/bootstrap.min.css b/public/styles/themes/cosmo/bootstrap-min.css similarity index 100% rename from public/styles/themes/cosmo/bootstrap.min.css rename to public/styles/themes/cosmo/bootstrap-min.css diff --git a/public/styles/themes/cyborg/bootstrap.min.css b/public/styles/themes/cyborg/bootstrap-min.css similarity index 100% rename from public/styles/themes/cyborg/bootstrap.min.css rename to public/styles/themes/cyborg/bootstrap-min.css diff --git a/public/styles/themes/darkly/bootstrap.min.css b/public/styles/themes/darkly/bootstrap-min.css similarity index 100% rename from public/styles/themes/darkly/bootstrap.min.css rename to public/styles/themes/darkly/bootstrap-min.css diff --git a/public/styles/themes/flatly/bootstrap.min.css b/public/styles/themes/flatly/bootstrap-min.css similarity index 100% rename from public/styles/themes/flatly/bootstrap.min.css rename to public/styles/themes/flatly/bootstrap-min.css diff --git a/public/styles/themes/journal/bootstrap.min.css b/public/styles/themes/journal/bootstrap-min.css similarity index 100% rename from public/styles/themes/journal/bootstrap.min.css rename to public/styles/themes/journal/bootstrap-min.css diff --git a/public/styles/themes/litera/bootstrap.min.css b/public/styles/themes/litera/bootstrap-min.css similarity index 100% rename from public/styles/themes/litera/bootstrap.min.css rename to public/styles/themes/litera/bootstrap-min.css diff --git a/public/styles/themes/lumen/bootstrap.min.css b/public/styles/themes/lumen/bootstrap-min.css similarity index 100% rename from public/styles/themes/lumen/bootstrap.min.css rename to public/styles/themes/lumen/bootstrap-min.css diff --git a/public/styles/themes/lux/bootstrap.min.css b/public/styles/themes/lux/bootstrap-min.css similarity index 100% rename from public/styles/themes/lux/bootstrap.min.css rename to public/styles/themes/lux/bootstrap-min.css diff --git a/public/styles/themes/materia/bootstrap.min.css b/public/styles/themes/materia/bootstrap-min.css similarity index 100% rename from public/styles/themes/materia/bootstrap.min.css rename to public/styles/themes/materia/bootstrap-min.css diff --git a/public/styles/themes/minty/bootstrap.min.css b/public/styles/themes/minty/bootstrap-min.css similarity index 100% rename from public/styles/themes/minty/bootstrap.min.css rename to public/styles/themes/minty/bootstrap-min.css diff --git a/public/styles/themes/morph/bootstrap.min.css b/public/styles/themes/morph/bootstrap-min.css similarity index 100% rename from public/styles/themes/morph/bootstrap.min.css rename to public/styles/themes/morph/bootstrap-min.css diff --git a/public/styles/themes/pulse/bootstrap.min.css b/public/styles/themes/pulse/bootstrap-min.css similarity index 100% rename from public/styles/themes/pulse/bootstrap.min.css rename to public/styles/themes/pulse/bootstrap-min.css diff --git a/public/styles/themes/sandstone/bootstrap.min.css b/public/styles/themes/sandstone/bootstrap-min.css similarity index 100% rename from public/styles/themes/sandstone/bootstrap.min.css rename to public/styles/themes/sandstone/bootstrap-min.css diff --git a/public/styles/themes/simplex/bootstrap.min.css b/public/styles/themes/simplex/bootstrap-min.css similarity index 100% rename from public/styles/themes/simplex/bootstrap.min.css rename to public/styles/themes/simplex/bootstrap-min.css diff --git a/public/styles/themes/sketchy/bootstrap.min.css b/public/styles/themes/sketchy/bootstrap-min.css similarity index 100% rename from public/styles/themes/sketchy/bootstrap.min.css rename to public/styles/themes/sketchy/bootstrap-min.css diff --git a/public/styles/themes/solar/bootstrap.min.css b/public/styles/themes/solar/bootstrap-min.css similarity index 100% rename from public/styles/themes/solar/bootstrap.min.css rename to public/styles/themes/solar/bootstrap-min.css diff --git a/public/styles/themes/spacelab/bootstrap.min.css b/public/styles/themes/spacelab/bootstrap-min.css similarity index 100% rename from public/styles/themes/spacelab/bootstrap.min.css rename to public/styles/themes/spacelab/bootstrap-min.css diff --git a/public/styles/themes/united/bootstrap.min.css b/public/styles/themes/united/bootstrap-min.css similarity index 100% rename from public/styles/themes/united/bootstrap.min.css rename to public/styles/themes/united/bootstrap-min.css diff --git a/public/styles/themes/vapor/bootstrap.min.css b/public/styles/themes/vapor/bootstrap-min.css similarity index 100% rename from public/styles/themes/vapor/bootstrap.min.css rename to public/styles/themes/vapor/bootstrap-min.css diff --git a/public/styles/themes/yeti/bootstrap.min.css b/public/styles/themes/yeti/bootstrap-min.css similarity index 100% rename from public/styles/themes/yeti/bootstrap.min.css rename to public/styles/themes/yeti/bootstrap-min.css diff --git a/public/styles/themes/zephyr/bootstrap.min.css b/public/styles/themes/zephyr/bootstrap-min.css similarity index 100% rename from public/styles/themes/zephyr/bootstrap.min.css rename to public/styles/themes/zephyr/bootstrap-min.css diff --git a/views/default3.handlebars b/views/default3.handlebars index 51247c8cc9..b68924bcaf 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -14138,10 +14138,9 @@ function account_switchThemeEx() { var themeSwitcher = document.getElementById('theme-switcher'); const selectedTheme = themeSwitcher.value; - const safeTheme = encodeURIComponent(selectedTheme); + const safeTheme = ((selectedTheme != 'default') ? encodeURIComponent(selectedTheme) : encodeURIComponent('..')); var themeStylesheet = document.getElementById('theme-stylesheet'); - var newThemeStylesheet = `styles/themes/${safeTheme}/bootstrap.min.css`; - themeStylesheet.href = newThemeStylesheet; + themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap-min.css`; // Save selected theme putstore('theme', selectedTheme); // Update last 4 themes selected diff --git a/webserver.js b/webserver.js index bd6887c52c..8b1efec49b 100644 --- a/webserver.js +++ b/webserver.js @@ -6502,7 +6502,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF 'Referrer-Policy': 'no-referrer', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', - 'Content-Security-Policy': "default-src 'none'; font-src 'self'; script-src 'self' 'unsafe-inline'" + extraScriptSrc + "; connect-src 'self'" + geourl + selfurl + "; img-src 'self' blob: data:" + geourl + " data:; style-src 'self' 'unsafe-inline'; frame-src 'self' blob: mcrouter:" + extraFrameSrc + "; media-src 'self'; form-action 'self'; manifest-src 'self'" + 'Content-Security-Policy': "default-src 'none'; font-src 'self' fonts.gstatic.com data:; script-src 'self' 'unsafe-inline' " + extraScriptSrc + "; connect-src 'self'" + geourl + selfurl + "; img-src 'self' blob: data:" + geourl + " data:; style-src 'self' 'unsafe-inline' fonts.googleapis.com; frame-src 'self' blob: mcrouter:" + extraFrameSrc + "; media-src 'self'; form-action 'self'; manifest-src 'self'" }; if (req.headers['user-agent'] && (req.headers['user-agent'].indexOf('Chrome') >= 0)) { headers['Permissions-Policy'] = 'interest-cohort=()'; } // Remove Google's FLoC Network, only send this if Chrome browser if ((parent.config.settings.allowframing !== true) && (typeof parent.config.settings.allowframing !== 'string')) { headers['X-Frame-Options'] = 'sameorigin'; }