diff --git a/README.md b/README.md
index 3f1959e18..ee4a45d32 100644
--- a/README.md
+++ b/README.md
@@ -251,14 +251,7 @@ Note: You need to initialize a size for the container element, like:
Type: object
Default:
-
- {
- 'controls': false,
- 'preload': 'auto',
- 'webkit-playsinline': true,
- 'playsinline': true
- }
-
+ {'controls': false,'preload': 'auto'}
More video Attributes
|
diff --git a/docs/js/common.js b/docs/js/common.js
index 99d6298c8..ef6e0f9ac 100644
--- a/docs/js/common.js
+++ b/docs/js/common.js
@@ -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 => {