仙化之人
- UID
- 335128
- 积分
- 30751
- 可用积分
- 点
- 威望
- 个
- 水滴
- 滴
- 存在感
- 点
- NB
- 点
- 豆币
- 点
- 帖子
- 主题
- 好友
- 精华
- APP积分
- 点
|
本帖最后由 炒土豆丝 于 2013-12-21 21:28 编辑
找到个很棒的油猴脚本!~
屏蔽做的很赞~不知道还以为DZ原生功能!~
首先~下载Greasemonkey(火狐)~Chrome下载Tampermonkey~
单击地址栏右边的油猴图标,再点击新建脚本,把这段代码复制进去保存就可以了~
将第9行的 id1 , id2 替换为自己讨厌的人的ID!~
- // ==UserScript==
- // @name discuz 屏蔽id
- // @namespace
- // @include */viewthread.php*
- // @include */thread*
- // @include */redirect.php*
- // @include */forum*
- // ==/UserScript==
- var bl = new Array("id1","id2","id3");
- for (x in bl) {
- b = document.evaluate('//table/tbody[tr[1]/td[1]//a[text()="' + bl[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- c = b.snapshotItem(i).firstChild.childNodes[3].textContent.replace(/\s*/g,"").slice(0,2);
- c = (Number(c) > 9)?c+"楼":c
- b.snapshotItem(i).innerHTML = "<center>被屏蔽帖子 " +c+" <font color=red>" + bl[x] + "</font></center>";
- }
- }
- }
- for (x in bl) {
- b =
- document.evaluate('//table/tbody[tr[1]/td[1]/div[1]//font[text()="' +
- bl[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
- null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- c =String(b.snapshotItem(i).firstChild.childNodes[3].textContent.match(/\d+#/)).replace(/#/,"楼");
- b.snapshotItem(i).innerHTML = "<center>被屏蔽帖子 "
- +c+" <font color=red>" + bl[x] + "</font></center>";
- }
- }
- }
- for (x in bl) {
- b =
- document.evaluate('//table/tbody[tr[1]/td[2]//cite/a[text()="' + bl[x] +
- '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- b.snapshotItem(i).innerHTML = "";
- }
- }
- }
复制代码
本来想修改网页背景颜色的~不过找不到好的~却找到了这货!~
作者是紫云飞~原贴 ~6L和12L!~
更多油猴脚本: http://bakatd.com/tampermonkey/
其实油猴能做的事非常多~前提是你会JS或者有人和你想法一样并且会JS!~
@Death骑士
PS 在userscripts.org搜到个COLGER制作的屏蔽脚本!!~
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
评分
-
查看全部评分
|