diff --git a/docs/assets/js/common.js b/docs/assets/js/common.js index dc5f86b62..00a78068f 100644 --- a/docs/assets/js/common.js +++ b/docs/assets/js/common.js @@ -20,7 +20,7 @@ window.consoleLog($console); var $typeScript = document.querySelector('#typeScript'); - $typeScript.checked = getURLParameters(window.location.href).typeScript === 'true'; + $typeScript.checked = localStorage.getItem('typeScript') === 'true'; var editor = null; require.config({ paths: { vs: './assets/js/vs' } }); @@ -186,16 +186,7 @@ function restart() { var libs = encodeURIComponent($lib.value); var code = encodeURIComponent(editor.getValue()); - var useTS = $typeScript.checked ? 'true' : 'false'; - var url = - window.location.origin + - window.location.pathname + - '?libs=' + - libs + - '&code=' + - code + - '&typeScript=' + - useTS; + var url = window.location.origin + window.location.pathname + '?libs=' + libs + '&code=' + code; history.pushState(null, null, url); initApp(); } @@ -211,7 +202,7 @@ }); $typeScript.addEventListener('change', function () { - restart(); + localStorage.setItem('typeScript', $typeScript.checked ? 'true' : 'false'); window.location.reload(); }); diff --git a/docs/uncompiled/artplayer/index.js b/docs/uncompiled/artplayer/index.js index b051f1cc7..10622a56e 100644 --- a/docs/uncompiled/artplayer/index.js +++ b/docs/uncompiled/artplayer/index.js @@ -248,7 +248,7 @@ class Artplayer extends (0, _emitterDefault.default) { return "development"; } static get build() { - return "2022-10-09 18:00:34"; + return "2022-10-09 18:13:44"; } static get config() { return 0, _configDefault.default;