1
0
Fork 0
mirror of https://github.com/treffynnon/sqlstyle.guide.git synced 2025-03-09 12:49:51 -05:00

Update scripts.js

This commit is contained in:
Simon Holywell 2019-11-04 11:12:12 +10:00 committed by GitHub
parent 14bf5e3ca5
commit 50f1029657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
target = document.getElementById(targetId || 'translation-bar');
if (target) {
e.preventDefault();
window.location.hash = e.target.hash;
history.pushState({}, `${document.title} - ${target.innerText}`, e.target.href);
target.scrollIntoView({behavior: 'smooth', block: 'start'});
}
}));