You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
playground: fix history.replaceState shadowed by terminal's history global
This commit is contained in:
@@ -107,7 +107,7 @@ document.querySelectorAll('.playground-example').forEach(function(btn) {
|
|||||||
// Reflect the clicked example in the URL so it can be shared/bookmarked.
|
// Reflect the clicked example in the URL so it can be shared/bookmarked.
|
||||||
var url = new URL(window.location.href);
|
var url = new URL(window.location.href);
|
||||||
url.searchParams.set('cmd', cmd);
|
url.searchParams.set('cmd', cmd);
|
||||||
history.replaceState(null, '', url);
|
window.history.replaceState(null, '', url);
|
||||||
document.getElementById('wasm-playground').scrollIntoView({ behavior: 'smooth' });
|
document.getElementById('wasm-playground').scrollIntoView({ behavior: 'smooth' });
|
||||||
if (window.runInTerminal) {
|
if (window.runInTerminal) {
|
||||||
window.runInTerminal(cmd);
|
window.runInTerminal(cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user