Skip to content

Commit

Permalink
2023.1.9 临时屏蔽
Browse files Browse the repository at this point in the history
  • Loading branch information
kings1990 committed Aug 31, 2023
1 parent 570a7b7 commit d7dad44
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineUserConfig({
],
["script", { src: "//at.alicdn.com/t/c/font_2601581_dhvis4jtn7m.js" }],
["script", { src: "/fast-request/js/baidu.js" }],
["script", { src: "https://cdn.wwads.cn/js/makemoney.js" }],
// ["script", { src: "https://cdn.wwads.cn/js/makemoney.js" }],
],

markdown: {
Expand Down Expand Up @@ -74,18 +74,18 @@ export default defineUserConfig({
__dirname,
"./layouts/Layout.vue",
),
"@theme-hope/components/HomePage": path.resolve(
__dirname,
"./components/HomePage.vue"
),
"@theme-hope/components/NormalPage": path.resolve(
__dirname,
"./components/NormalPage.vue"
),
"@theme-hope/modules/sidebar/components/Sidebar": path.resolve(
__dirname,
"./components/Sidebar.vue"
),
// "@theme-hope/components/HomePage": path.resolve(
// __dirname,
// "./components/HomePage.vue"
// ),
// "@theme-hope/components/NormalPage": path.resolve(
// __dirname,
// "./components/NormalPage.vue"
// ),
// "@theme-hope/modules/sidebar/components/Sidebar": path.resolve(
// __dirname,
// "./components/Sidebar.vue"
// ),
},

});
19 changes: 19 additions & 0 deletions docs/.vuepress/public/js/ad.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function ABDetected() {
var adBlockDetected_div = document.createElement("div");
document.body.appendChild(adBlockDetected_div);
var navbar = document.querySelector(".vp-navbar");
navbar.style.cssText="transition:top 300ms;top:33px";
adBlockDetected_div.style.cssText = "position: fixed; top: 0; left: 0; width: 100%; background: #E01E5A; color: #fff; z-index: 9999999999; font-size: 14px; text-align: center; line-height: 1.5; font-weight: bold; padding-top: 6px; padding-bottom: 6px;";
adBlockDetected_div.innerHTML = "我们的广告服务商 <a style='color:#fff;text-decoration:underline' target='_blank' href=' '>并不跟踪您的隐私</a >,为了支持本站的长期运营,请将我们的网站 <a style='color: #fff;text-decoration:underline' target='_blank' href='https://wwads.cn/page/whitelist-wwads'>加入广告拦截器的白名单</a >。";
document.getElementsByTagName("body")[0].appendChild(adBlockDetected_div);
// add a close button to the right side of the div
var adBlockDetected_close = document.createElement("div");
adBlockDetected_close.style.cssText = "position: absolute; top: 0; right: 10px; width: 30px; height: 30px; background: #E01E5A; color: #fff; z-index: 9999999999; line-height: 30px; cursor: pointer;";
adBlockDetected_close.innerHTML = "×";
adBlockDetected_div.appendChild(adBlockDetected_close);
// add a click event to the close button
adBlockDetected_close.onclick = function() {
this.parentNode.parentNode.removeChild(this.parentNode);
navbar.style.cssText="transition:top 300ms;top:0";
};
}

0 comments on commit d7dad44

Please sign in to comment.