Switch back to using j69.ejs-beautify

- Reformat index.mjs
- Don't preload playlist.json to avoid Safari warning about
  unused preloaded resource
This commit is contained in:
Eddy G 2025-07-13 18:54:25 -04:00
commit d25a632f7d
2 changed files with 191 additions and 186 deletions

View file

@ -15,7 +15,6 @@
<link rel="manifest" href="manifest.json" />
<link rel="icon" href="images/logos/logo192.png" />
<link rel="apple-touch-icon" sizes="180x180" href="images/logos/app-icon-180.png" />
<link rel="preload" href="playlist.json" as="fetch" crossorigin="anonymous"/>
<meta property="og:image" content="https://weatherstar.netbymatt.com/images/social/1200x600.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
@ -24,18 +23,24 @@
<link rel="prefetch" href="fonts/Star4000 Large.woff" as="font" type="font/woff" crossorigin>
<link rel="prefetch" href="fonts/Star4000 Small.woff" as="font" type="font/woff" crossorigin>
<% if (typeof serverAvailable !== 'undefined' && serverAvailable) { %>
<script>window.WS4KP_SERVER_AVAILABLE=true;</script>
<script>
window.WS4KP_SERVER_AVAILABLE = true;
</script>
<% } %>
<% if (production) { %>
<link rel="stylesheet" type="text/css" href="resources/ws.min.css?_=<%=production%>" />
<script type="text/javascript" src="resources/vendor.min.js?_=<%=production%>"></script>
<script type="text/javascript" src="resources/ws.min.js?_=<%=production%>"></script>
<script type="text/javascript">const OVERRIDES=<%-JSON.stringify(OVERRIDES)%>;</script>
<script type="text/javascript">
const OVERRIDES = <%- JSON.stringify(OVERRIDES ?? {}) %>;
</script>
<% } else { %>
<link rel="stylesheet" type="text/css" href="styles/main.css" />
<!--<script type="text/javascript">const OVERRIDES={};</script>-->
<script type="text/javascript">OVERRIDES=<%-JSON.stringify(OVERRIDES)%>;</script>
<script type="text/javascript">
OVERRIDES = <%- JSON.stringify(OVERRIDES ?? {}) %>;
</script>
<script type="text/javascript" src="scripts/vendor/auto/nosleep.js"></script>
<script type="text/javascript" src="scripts/vendor/auto/swiped-events.js"></script>
<script type="text/javascript" src="scripts/vendor/auto/suncalc.js"></script>
@ -63,13 +68,12 @@
</head>
<body<% if (query && query['settings-kiosk-checkbox'] === 'true') { %> class="kiosk"<% } %>>
<body <% if (query && query['settings-kiosk-checkbox'] === 'true' ) { %>class="kiosk" <% }%>>
<div id="divQuery">
<input id="txtLocation" type="text" value="" placeholder="ZIP Code or City, State" data-1p-ignore />
<div class="buttons">
<button id="btnGetGps" type="button" title="Get GPS Location"><img src="images/nav/ic_gps_fixed_black_18dp_1x.png"
class="light" />
<button id="btnGetGps" type="button" title="Get GPS Location"><img src="images/nav/ic_gps_fixed_black_18dp_1x.png" class="light" />
<img src="images/nav/ic_gps_fixed_white_18dp_1x.png" class="dark" />
</button>
<button id="btnGetLatLng" type="submit">GO</button>

View file

@ -60,9 +60,9 @@
"emmet.includeLanguages": {
"ejs": "html",
},
"[html]": {
// Use built-in VS Code HTML formatter instead of third-party EJS extension
"editor.defaultFormatter": "vscode.html-language-features"
"[ejs]": {
"editor.occurrencesHighlight": "off",
"editor.defaultFormatter": "j69.ejs-beautify"
},
"files.exclude": {},
"files.eol": "\n",
@ -79,6 +79,7 @@
"digitalbrainstem.javascript-ejs-support", // EJS (Embedded JavaScript) template language support
"dbaeumer.vscode-eslint", // ESLint JavaScript linting integration
"streetsidesoftware.code-spell-checker",
"j69.ejs-beautify",
]
}
}