update demo

This commit is contained in:
Harvey committed 2022-10-09 18:14:54 +08:00
1 parent bd7de49585
commit e57be9ff2e
2 files changed
+4 -13

No files matched your search

+3 -12
View File
@@ -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();
});
+1 -1
View File
@@ -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;