mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
update demo
This commit is contained in:
1 parent
bd7de49585
commit
e57be9ff2e
2 files changed
+4
-13
No files matched your search
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user