Skip to content

Commit

Permalink
feat: add remove append contents
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinpan committed Oct 23, 2023
1 parent b3d5423 commit 10f54c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/dytt-remove-ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* - 功能7:去掉首次点击任何地方弹出广告
* - 功能8:删除所有图片广告
* - 功能9:删除【紧急通知】
* - 功能10:移除附加内容(跳转/广告)
*/

class ImgControl {
Expand All @@ -46,6 +47,8 @@ class ImgControl {
start();

function start() {
removeWrite();

ImgControl.hide();
document.addEventListener('DOMContentLoaded', function () {
removeFirst();
Expand Down Expand Up @@ -177,3 +180,9 @@ function removeFirst() {
e.stopPropagation();
}, true);
}

// 移除附加内容(跳转/广告)
function removeWrite() {
document.write = () => {};
document.writeln = () => {};
}

0 comments on commit 10f54c1

Please sign in to comment.