Skip to content
Snippets Groups Projects
Commit d2fc0879 authored by Austin Anderson's avatar Austin Anderson
Browse files

Fix it all, finally

parent 8627ab4d
No related branches found
No related tags found
No related merge requests found
...@@ -97,15 +97,19 @@ $(function () { ...@@ -97,15 +97,19 @@ $(function () {
history.replaceState(null, null, ' ') history.replaceState(null, null, ' ')
}) })
// When the page loads, if there is a commit ID in the location hash, show // When the page loads, check the location hash, and...
// the matching modal -- that is, if you load dashboard#commit, show the modal // - If there's a matching category on the page, scroll to it
// for that commit. Also, show the matching modal if a CL is provided instead. // - If there is a commit ID in the location hash, show that commit
// - If there is a CL in the location hash, show that CL's commit
// - If there is a PR in the location hash, show that PR's commit
unescaped = decodeURIComponent(window.location.hash).replace("#", "").replace("+", "") unescaped = decodeURIComponent(window.location.hash).replace("#", "").replace("+", "")
// Nothing to do if no hash in the URL
if (window.location.hash.length <= 1) { if (window.location.hash.length <= 1) {
// Empty! // Nothing to do if no hash in the URL
// If the hash matches a Category on the page, then scroll to it // If the hash matches a Category on the page, then scroll to it.
} else if (document.getElementById(unescaped)) { } else if (document.getElementById(unescaped)) {
// Google Chrome, at least, does not scroll if the tab is opened in the
// background, so we try and scroll a moment after the first time the tab
// gets focus, or immediately if it has focus already.
if (document.hasFocus()) { if (document.hasFocus()) {
document.getElementById(unescaped).scrollIntoView(); document.getElementById(unescaped).scrollIntoView();
} else { } else {
......
...@@ -21,7 +21,7 @@ html(lang="en") ...@@ -21,7 +21,7 @@ html(lang="en")
nav.navbar.navbar-dark.navbar-expand-lg.py-0.mb-2 nav.navbar.navbar-dark.navbar-expand-lg.py-0.mb-2
.container-fluid.py-0 .container-fluid.py-0
.d-flex.flex-row .d-flex.flex-row
a.navbar-brand TensorFlow GitHub CI a(href=).navbar-brand TensorFlow GitHub CI
.navbar-text#tf-now(data-isonow=isonow) Last updated on .navbar-text#tf-now(data-isonow=isonow) Last updated on
a(title="Check the dashboard deployment GitHub Actions workflow" href="https://github.com/tensorflow/build/actions/workflows/dashboard.yml") #{now} a(title="Check the dashboard deployment GitHub Actions workflow" href="https://github.com/tensorflow/build/actions/workflows/dashboard.yml") #{now}
| |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment