summaryrefslogtreecommitdiff
path: root/web/share/js/bb.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/share/js/bb.js')
-rw-r--r--web/share/js/bb.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/web/share/js/bb.js b/web/share/js/bb.js
index 3a54e8e7..4a58a5d4 100644
--- a/web/share/js/bb.js
+++ b/web/share/js/bb.js
@@ -130,16 +130,18 @@ export function checkBrowser(desktop_css, mobile_css) {
return false;
} else {
- if (browser.is_mobile) {
- __addCssLink("/share/css/x-mobile.css");
- if (mobile_css) {
- __addCssLink(mobile_css);
- }
- } else {
+ let force_desktop = (new URL(window.location.href)).searchParams.get("force_desktop");
+ let force_mobile = (new URL(window.location.href)).searchParams.get("force_mobile");
+ if ((force_desktop || !browser.is_mobile) && !force_mobile) {
__addCssLink("/share/css/x-desktop.css");
if (desktop_css) {
__addCssLink(desktop_css);
}
+ } else {
+ __addCssLink("/share/css/x-mobile.css");
+ if (mobile_css) {
+ __addCssLink(mobile_css);
+ }
}
return true;
}