求可以屏蔽论坛的插件。
。好像封禁了,还是能看帖子只是不能回复
不要封禁了,求插件,那种可以屏蔽论坛的插件。
好了此帖结,想要插件的在这里,以后再也打不开论坛了:
// ==UserScript==
// @name 禁止访问 discourse.xinyoudui.com
// @namespace http://tampermonkey.net/
// @version 1.1
// @description 强制拦截访问,显示自定义阻止页面
// @author You
// @match https://discourse.xinyoudui.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// 立即阻止页面加载
if (window.location.href.includes('discourse.xinyoudui.com')) {
// 1. 阻止浏览器加载任何内容(核心)
window.stop(); // 终止页面加载
window.location = 'about:blank'; // 跳转到空白页
// 2. 显示屏蔽提示(即使网络延迟也能显示)
const errorPage = `
<!DOCTYPE html>
<html>
<head>
<title>访问被阻止</title>
<style>
body { font-family: Arial, sans-serif; text-align: center; margin: 50px; }
h1 { color: #ff4444; }
p { font-size: 1.2em; color: #333; }
</style>
</head>
<body>
<h1>❌ 禁止访问</h1>
<p>你试图访问的网站:<br><strong>${window.location.href}</strong></p>
<p>原因:已通过用户脚本永久屏蔽</p>
</body>
</html>
`;
// 强制替换页面内容(防止残留)
document.open();
document.write(errorPage);
document.close();
// 3. 深度屏蔽(可选,防止重定向或资源加载)
Object.defineProperty(window, 'location', {
value: { href: 'about:blank' },
writable: false
});
// 禁止加载任何资源(图片、脚本等)
['img', 'script', 'link', 'iframe'].forEach(tag => {
document.querySelectorAll(tag).forEach(el => el.remove());
});
}
})();
1 个赞