mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -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);
|
window.consoleLog($console);
|
||||||
|
|
||||||
var $typeScript = document.querySelector('#typeScript');
|
var $typeScript = document.querySelector('#typeScript');
|
||||||
$typeScript.checked = getURLParameters(window.location.href).typeScript === 'true';
|
$typeScript.checked = localStorage.getItem('typeScript') === 'true';
|
||||||
|
|
||||||
var editor = null;
|
var editor = null;
|
||||||
require.config({ paths: { vs: './assets/js/vs' } });
|
require.config({ paths: { vs: './assets/js/vs' } });
|
||||||
@@ -186,16 +186,7 @@
|
|||||||
function restart() {
|
function restart() {
|
||||||
var libs = encodeURIComponent($lib.value);
|
var libs = encodeURIComponent($lib.value);
|
||||||
var code = encodeURIComponent(editor.getValue());
|
var code = encodeURIComponent(editor.getValue());
|
||||||
var useTS = $typeScript.checked ? 'true' : 'false';
|
var url = window.location.origin + window.location.pathname + '?libs=' + libs + '&code=' + code;
|
||||||
var url =
|
|
||||||
window.location.origin +
|
|
||||||
window.location.pathname +
|
|
||||||
'?libs=' +
|
|
||||||
libs +
|
|
||||||
'&code=' +
|
|
||||||
code +
|
|
||||||
'&typeScript=' +
|
|
||||||
useTS;
|
|
||||||
history.pushState(null, null, url);
|
history.pushState(null, null, url);
|
||||||
initApp();
|
initApp();
|
||||||
}
|
}
|
||||||
@@ -211,7 +202,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$typeScript.addEventListener('change', function () {
|
$typeScript.addEventListener('change', function () {
|
||||||
restart();
|
localStorage.setItem('typeScript', $typeScript.checked ? 'true' : 'false');
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class Artplayer extends (0, _emitterDefault.default) {
|
|||||||
return "development";
|
return "development";
|
||||||
}
|
}
|
||||||
static get build() {
|
static get build() {
|
||||||
return "2022-10-09 18:00:34";
|
return "2022-10-09 18:13:44";
|
||||||
}
|
}
|
||||||
static get config() {
|
static get config() {
|
||||||
return 0, _configDefault.default;
|
return 0, _configDefault.default;
|
||||||
|
|||||||
Reference in new issue
Block a user