bump: 3.6.2
This commit is contained in:
parent
94d6603c06
commit
91c6db2902
4 changed files with 17 additions and 11 deletions
|
|
@ -4,16 +4,22 @@ this.D = this.D || {};
|
|||
|
||||
function handleExternalScript () {
|
||||
var container = Docsify.dom.getNode('#main');
|
||||
var script = Docsify.dom.find(container, 'script');
|
||||
var scripts = Docsify.dom.findAll(container, 'script');
|
||||
|
||||
if (script && script.src) {
|
||||
var newScript = document.createElement('script');['src', 'async', 'defer'].forEach(function (attribute) {
|
||||
newScript[attribute] = script[attribute];
|
||||
});
|
||||
var loop = function ( i ) {
|
||||
var script = scripts[i];
|
||||
|
||||
script.parentNode.insertBefore(newScript, script);
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
if (script && script.src) {
|
||||
var newScript = document.createElement('script');['src', 'async', 'defer'].forEach(function (attribute) {
|
||||
newScript[attribute] = script[attribute];
|
||||
});
|
||||
|
||||
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