From 10f54c121ef7b042f3c7788cbc04bf8cac0c119f Mon Sep 17 00:00:00 2001 From: yujinpan <1192878390@qq.com> Date: Mon, 23 Oct 2023 17:20:13 +0800 Subject: [PATCH] feat: add remove append contents --- scripts/dytt-remove-ads.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/dytt-remove-ads.js b/scripts/dytt-remove-ads.js index b437305..34f3200 100644 --- a/scripts/dytt-remove-ads.js +++ b/scripts/dytt-remove-ads.js @@ -27,6 +27,7 @@ * - 功能7:去掉首次点击任何地方弹出广告 * - 功能8:删除所有图片广告 * - 功能9:删除【紧急通知】 + * - 功能10:移除附加内容(跳转/广告) */ class ImgControl { @@ -46,6 +47,8 @@ class ImgControl { start(); function start() { + removeWrite(); + ImgControl.hide(); document.addEventListener('DOMContentLoaded', function () { removeFirst(); @@ -177,3 +180,9 @@ function removeFirst() { e.stopPropagation(); }, true); } + +// 移除附加内容(跳转/广告) +function removeWrite() { + document.write = () => {}; + document.writeln = () => {}; +}