Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This branch generates the STL's [Status Chart][].

## Repo

1. Install [Node.js][] 17.8.0 or newer.
1. Install [Node.js][] 18.7.0 or newer.
+ You can accept all of the installer's default options.
2. Open a new Command Prompt.
+ You can run `node --version` to verify that Node.js was successfully installed.
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<!-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>STL Status Chart</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@primer/css@20.4.0/dist/primer.min.css" />
<script async src="https://cdn.jsdelivr.net/npm/es-module-shims@1.5.9/dist/es-module-shims.min.js"
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@primer/css@20.4.1/dist/primer.min.css" />
<script async src="https://cdn.jsdelivr.net/npm/es-module-shims@1.5.10/dist/es-module-shims.min.js"
crossorigin="anonymous"></script>
<script type="importmap">
{ "imports": {
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@octokit/graphql": "^5.0.0",
"@types/cli-progress": "^3.11.0",
"@types/luxon": "^3.0.0",
"@types/node": "^18.6.2",
"@types/node": "^18.6.3",
"@types/yargs": "^17.0.10",
"chart.js": "^3.8.2",
"chartjs-adapter-luxon": "^1.1.0",
Expand Down
15 changes: 14 additions & 1 deletion src/status_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,17 @@ function load_charts() {
}
}

window.addEventListener('load', _event => load_charts()); // wait for stylesheets to finish loading
// wait for Primer CSS to finish loading
function check_css() {
const regex = new RegExp('@primer/css');
for (const sheet of document.styleSheets) {
if (sheet.href !== null && regex.test(sheet.href)) {
load_charts();
return;
}
}

window.setTimeout(check_css, 50 /* milliseconds */);
}

check_css();