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) {
|
||||
|
|
|
|||
2
lib/plugins/external-script.min.js
vendored
2
lib/plugins/external-script.min.js
vendored
|
|
@ -1 +1 @@
|
|||
this.D=this.D||{},function(){"use strict";function n(){for(var n=Docsify.dom.getNode("#main"),i=Docsify.dom.findAll(n,"script"),o=function(n){var o=i[n];if(o&&o.src){var c=document.createElement("script");["src","async","defer"].forEach(function(n){c[n]=o[n]}),o.parentNode.insertBefore(c,o),o.parentNode.removeChild(o)}},c=i.length;c--;)o(c)}var i=function(i){i.doneEach(n)};window.$docsify.plugins=[].concat(i,window.$docsify.plugins)}();
|
||||
this.D=this.D||{},function(){"use strict";function e(){for(var e=Docsify.dom.getNode("#main"),i=Docsify.dom.findAll(e,"script"),o=i.length;o--;){var t=i[o];if(t&&t.src){var n=document.createElement("script");Array.prototype.slice.call(t.attributes).forEach(function(e){n[e.name]=e.value}),t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)}}}var i=function(i){i.doneEach(e)};window.$docsify.plugins=[].concat(i,window.$docsify.plugins)}();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue