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

View File

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