mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
typofix
This commit is contained in:
1 parent
0f56ffbef8
commit
bac873deeb
2 files changed
+10
-12
No files matched your search
@@ -251,14 +251,7 @@ Note: You need to initialize a size for the container element, like:
|
||||
<td>
|
||||
Type: <code>object</code><br>
|
||||
Default:<br>
|
||||
<code>
|
||||
{<br>
|
||||
'controls': false,<br>
|
||||
'preload': 'auto',<br>
|
||||
'webkit-playsinline': true,<br>
|
||||
'playsinline': true<br>
|
||||
}
|
||||
</code><br><br>
|
||||
<code>{'controls': false,'preload': 'auto'}</code><br><br>
|
||||
More video Attributes<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+9
-4
@@ -1,6 +1,7 @@
|
||||
(function(win) {
|
||||
var $code = document.querySelector('.code');
|
||||
var $run = document.querySelector('.run');
|
||||
var fileCode = '';
|
||||
|
||||
consola.creat({
|
||||
target: '.console',
|
||||
@@ -44,8 +45,10 @@
|
||||
return response.text();
|
||||
})
|
||||
.then(text => {
|
||||
mirror.setValue(text.trim());
|
||||
var code = text.trim();
|
||||
mirror.setValue(code);
|
||||
runCode();
|
||||
fileCode = code;
|
||||
return text;
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -65,9 +68,11 @@
|
||||
|
||||
$run.addEventListener('click', function(e) {
|
||||
runCode();
|
||||
const code = encodeURIComponent(mirror.getValue());
|
||||
const url = window.location.origin + window.location.pathname + '?code=' + code;
|
||||
history.pushState(null, null, url);
|
||||
if (fileCode !== mirror.getValue()) {
|
||||
const code = encodeURIComponent(mirror.getValue());
|
||||
const url = window.location.origin + window.location.pathname + '?code=' + code;
|
||||
history.pushState(null, null, url);
|
||||
}
|
||||
});
|
||||
|
||||
win.addEventListener('error', err => {
|
||||
|
||||
Reference in new issue
Block a user