kubernetes-handbook/node_modules/gitbook-plugin-3-ba/book/plugin.js

21 lines
659 B
JavaScript
Raw Normal View History

2021-04-13 00:24:28 +08:00
require(["gitbook"], function(gitbook) {
// Load analytics.js
gitbook.events.bind("start", function(e, config) {
var cfg = config['3-ba'];
window._hmt = window._hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?" + cfg.token;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
});
// Notify pageview
gitbook.events.bind("page.change", function() {
var path = window.location.pathname+window.location.search
_hmt.push(['_trackPageview', path]);
});
});