Skip to content

Commit 0570377

Browse files
reformat
1 parent cb79f72 commit 0570377

File tree

6 files changed

+730
-658
lines changed

6 files changed

+730
-658
lines changed

.eslintrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@
2727
"addEventListener": "readonly"
2828
},
2929
"rules": {
30-
"no-unused-vars": ["warn", { "args": "none" }],
30+
"no-unused-vars": [
31+
"warn",
32+
{
33+
"args": "none"
34+
}
35+
],
3136
"no-console": "off",
3237
"no-empty": "warn",
3338
"no-undef": "warn",
3439
"no-const-assign": "error"
3540
}
36-
}
41+
}

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"arrowParens": "avoid",
1010
"endOfLine": "lf",
1111
"htmlWhitespaceSensitivity": "ignore"
12-
}
12+
}

design-switch.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99
*
1010
* Note: This script is only loaded on the root index.html
1111
*/
12-
(function() {
12+
(function () {
1313
'use strict';
14-
14+
1515
// Don't run this script if we're already on a specific design page
1616
// This prevents infinite redirect loops
1717
const currentPath = window.location.pathname;
1818
if (currentPath.includes('index-classic.html') || currentPath.includes('index-modern.html')) {
1919
return;
2020
}
21-
21+
2222
// Check URL parameters first (they override config)
2323
const urlParams = new URLSearchParams(window.location.search);
2424
const designParam = urlParams.get('design');
25-
25+
2626
if (designParam === 'new') {
2727
redirectToNewDesign();
2828
return;
2929
}
30-
30+
3131
if (designParam === 'old' || designParam === 'classic') {
3232
redirectToOldDesign();
3333
return;
3434
}
35-
35+
3636
// Check config.json for design preference
3737
try {
3838
const xhr = new XMLHttpRequest();
@@ -57,13 +57,13 @@
5757
console.log('Using default (old) design:', error.message || 'config error');
5858
redirectToOldDesign();
5959
}
60-
60+
6161
function redirectToNewDesign() {
6262
// Preserve any URL parameters when redirecting
6363
const currentParams = window.location.search;
6464
window.location.href = 'index-modern.html' + currentParams;
6565
}
66-
66+
6767
function redirectToOldDesign() {
6868
// Preserve any URL parameters when redirecting
6969
const currentParams = window.location.search;

0 commit comments

Comments
 (0)