mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
bump: 3.6.2
This commit is contained in:
parent
94d6603c06
commit
91c6db2902
@ -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) {
|
||||
|
||||
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 i(){var i=Docsify.dom.getNode("#main"),n=Docsify.dom.find(i,"script");if(n&&n.src){var o=document.createElement("script");["src","async","defer"].forEach(function(i){o[i]=n[i]}),n.parentNode.insertBefore(o,n),n.parentNode.removeChild(n)}}var n=function(n){n.doneEach(i)};window.$docsify.plugins=[].concat(n,window.$docsify.plugins)}();
|
||||
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)}();
|
||||
|
||||
2
lib/plugins/ga.min.js
vendored
2
lib/plugins/ga.min.js
vendored
@ -1 +1 @@
|
||||
this.D=this.D||{},function(){"use strict";function n(){var n=document.createElement("script");n.async=!0,n.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(n)}function o(o){window.ga||(n(),window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=Number(new Date),window.ga("create",o,"auto"))}function i(){o(window.$docsify.ga),window.ga("set","page",location.href),window.ga("send","pageview")}var w=function(n){return window.$docsify.ga?void n.beforeEach(i):void console.error("[Docsify] ga is required.")};window.$docsify.plugins=[].concat(w,window.$docsify.plugins)}();
|
||||
this.D=this.D||{},function(){"use strict";function n(){var n=document.createElement("script");n.async=!0,n.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(n)}function o(o){window.ga||(n(),window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=Number(new Date),window.ga("create",o,"auto"))}function i(){o(window.$docsify.ga),window.ga("set","page",location.hash),window.ga("send","pageview")}var w=function(n){return window.$docsify.ga?void n.beforeEach(i):void console.error("[Docsify] ga is required.")};window.$docsify.plugins=[].concat(w,window.$docsify.plugins)}();
|
||||
|
||||
@ -19,7 +19,7 @@ function init (id) {
|
||||
|
||||
function collect () {
|
||||
init(window.$docsify.ga)
|
||||
window.ga('set', 'page', location.href)
|
||||
window.ga('set', 'page', location.hash)
|
||||
window.ga('send', 'pageview')
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user