bump: 3.6.3
This commit is contained in:
parent
11c94b2149
commit
a5f6ccd1d1
2 changed files with 7 additions and 7 deletions
|
|
@ -6,20 +6,20 @@ function handleExternalScript () {
|
|||
var container = Docsify.dom.getNode('#main');
|
||||
var scripts = Docsify.dom.findAll(container, 'script');
|
||||
|
||||
var loop = function ( i ) {
|
||||
for (var i = scripts.length; i--;) {
|
||||
var script = scripts[i];
|
||||
|
||||
if (script && script.src) {
|
||||
var newScript = document.createElement('script');['src', 'async', 'defer'].forEach(function (attribute) {
|
||||
newScript[attribute] = script[attribute];
|
||||
var newScript = document.createElement('script');
|
||||
|
||||
Array.prototype.slice.call(script.attributes).forEach(function (attribute) {
|
||||
newScript[attribute.name] = attribute.value;
|
||||
});
|
||||
|
||||
script.parentNode.insertBefore(newScript, script);
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
};
|
||||
|
||||
for (var i = scripts.length; i--;) loop( i );
|
||||
}
|
||||
}
|
||||
|
||||
var install = function (hook) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue