mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Switch to hosted Ginseng Analytics script
This commit is contained in:
parent
ea3ff4f1a1
commit
4bcf4349eb
@ -1 +0,0 @@
|
||||
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function i(e){if(window.requestIdleCallback)return window.requestIdleCallback(e);var t=Date.now();return window.setTimeout(function(){return e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)}function o(e){return window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.native="function"==typeof window.requestIdleCallback,t.enqueue=i,t.dequeue=o},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";function i(e){return e.data.concat(e.children?e.children.map(i):[])}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(7),u=n(8);t.pack=i;var c=new o.LayoutTask(document.body);c.run(function(e){u.request("https://api.staging.ginseng.ai/collect",{method:"POST",headers:{"X-Api-Key":"GutlUecLmu5mCFNVOXe403pKi0Fon4rb2vMMbVyR"},body:JSON.stringify([r.viewport(),JSON.stringify([c.execution.toJSON(),i(e)])])},function(){})})},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),r=n(6),u=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return i(t,e),t.prototype.run=function(e){var t=this;return this.schedule(function(n,i){return t.execute(n,i)?function(){return e(i.queue[0][1])}:void 0},{index:0,queue:[[this.el,{}]]})},t.prototype.execute=function(e,t){for(;e.timeRemaining()>1&&t.index<t.queue.length;){var n=t.queue[t.index++],i=n[0],o=n[1];if(o.data=r.extract(i),i.children&&i.children.length){o.children=[];for(var u=0,c=i.children.length;u<c;u++){var a=[i.children[u],{data:void 0}];o.children.push(a[1]),t.queue.push(a)}}}return t.index===t.queue.length},t}(o.Task);t.LayoutTask=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(5),r=function(){function e(e){void 0===e&&(e=new o.TaskExecution),this.execution=e}return e.prototype.schedule=function(e,t){var n=this,o=Date.now();i.enqueue(function(i){var r={cycles:t.index,time:{queued:Date.now()-o,used:i.timeRemaining()}},u=e(i,t);"function"!=typeof u?n.schedule(e,t):u(),r.time.used-=i.timeRemaining(),r.cycles=t.index-r.cycles,n.execution.add(r)})},e}();t.Task=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(e,t){void 0===e&&(e=i.native),void 0===t&&(t=[]),this.native=e,this.frames=t}return e.prototype.add=function(e){this.frames.push(e)},e.prototype.toJSON=function(){return[!0===this.native?0:1,this.frames.map(function(e){return[e.cycles,[Math.round(e.time.queued),Math.round(e.time.used)]]})]},e}();t.TaskExecution=o},function(e,t,n){"use strict";function i(e){var t=e.getBoundingClientRect();return[t.left+window.pageXOffset,t.top+window.pageYOffset,t.width,t.height]}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=i},function(e,t,n){"use strict";function i(){return[window.innerWidth||document.documentElement.clientWidth,window.innerHeight||document.documentElement.clientHeight]}Object.defineProperty(t,"__esModule",{value:!0}),t.viewport=i},function(e,t,n){"use strict";function i(e,t,n){var i=new window.XMLHttpRequest;return i.open(t.method,e,!0),i.setRequestHeader("Content-Type","application/json"),Object.keys(t.headers||{}).forEach(function(e){i.setRequestHeader(e,t.headers[e])}),i.onload=function(){return n(i.responseText)},"POST"===t.method?i.send(t.body):i.send(),i}Object.defineProperty(t,"__esModule",{value:!0}),t.request=i}]));
|
@ -124,4 +124,4 @@ google_analytics:
|
||||
|
||||
# Temporary scripts for testing
|
||||
extra_javascript:
|
||||
- assets/javascripts/ginseng.js
|
||||
- https://staging.ginseng.ai/analytics.js
|
||||
|
Loading…
Reference in New Issue
Block a user