From 5eec0bf7b2750e7a102f068bd6def58d55e67636 Mon Sep 17 00:00:00 2001 From: wizardforcel <562826179@qq.com> Date: Mon, 23 Nov 2020 12:44:52 +0800 Subject: [PATCH] 2020-11-23 12:44:52 --- asset/docsify-baidu-push.js | 13 +++++++++++++ index.html | 1 + 2 files changed, 14 insertions(+) create mode 100644 asset/docsify-baidu-push.js diff --git a/asset/docsify-baidu-push.js b/asset/docsify-baidu-push.js new file mode 100644 index 0000000..27b1f74 --- /dev/null +++ b/asset/docsify-baidu-push.js @@ -0,0 +1,13 @@ +(function(){ + var plugin = function(hook) { + hook.doneEach(function() { + new Image().src = + '//api.share.baidu.com/s.gif?r=' + + encodeURIComponent(document.referrer) + + "&l=" + encodeURIComponent(location.href) + }) + } + var plugins = window.$docsify.plugins || [] + plugins.push(plugin) + window.$docsify.plugins = plugins +})() \ No newline at end of file diff --git a/index.html b/index.html index 516fac5..e299560 100644 --- a/index.html +++ b/index.html @@ -89,5 +89,6 @@ + \ No newline at end of file -- GitLab