用firefox、opera的来塞抹布

http://bbs.stage1st.com/thread-284433-1-2.html 

用firefox、opera的来塞抹布

目前3种方案:
1、firefox + remove it permanently
2、firefox + greasemonkey + user js
3、opera + user js
个人感觉gm比rip省资源
opera的user js是在页面完全加载后才运行,所以被屏蔽的内容在页面完全加载完之前会有显示。。。

just for fun

具体如下:

1、firefox + remove it permanently

把下面这个另存为xml文件(utf-8编码),然后在rip里面导入

[Copy to clipboard] [ - ]

CODE:

<Config version=”1.0″>
<Page name=”STAGE1抹布” url=”http://bbs.stage1st.com/*” enabled=”true”>
<XPath comment=”">/html/body/center/div/form/div/table/tbody/tr/td[2]/table/tbody/tr[2][../../../../td[1]//a[@href[contains(.,'uid-00000.')]]]</XPath>
</Page>
</Config>
把00000替换成要塞抹布的id的uid
这样至少表面上看不到塞过抹布的人的发言了
如果要塞多个id
那么手动在rip里面多次添加XPath即可

[Copy to clipboard] [ - ]

CODE:

/html/body/center/div/form/div/table/tbody/tr/td[2]/table/tbody/tr[2][../../../../td[1]//a[@href[contains(.,'uid-00000.')]]]

如果连id、头像都不想看到,把

[Copy to clipboard] [ - ]

CODE:

/html/body/center/div/form/div/table/tbody/tr/td[2]/table/tbody/tr[2][../../../../td[1]//a[@href[contains(.,'uid-00000.')]]]

改成

[Copy to clipboard] [ - ]

CODE:

/html/body/center/div/form/div/table/tbody/tr[./td[1]//a[@href[contains(.,'uid-00000.')]]]

即可

====================================================================================================

2、firefox + greasemonkey
脚本,uid自行添加

[Copy to clipboard] [ - ]

CODE:

// ==UserScript==
// @name           stage1st
// @namespace      stage1st
// @include        http://bbs.stage1st.com/*
// ==/UserScript==

var BlockedUIDList = new Array(
// 在此添加塞抹布的uid,别漏掉逗号
0,
1
);

function blockbyuid(){
if (BlockedUIDList != null){
for ( var n = 0 ; n < BlockedUIDList.length ; n++ ){
var pXPE = new XPathEvaluator();
var nodes = pXPE.evaluate(”/html/body/center/div/form/div/table/tbody/tr/td[2]/table/tbody/tr[2][../../../../td[1]//a[@href[contains(.,'uid-"+BlockedUIDList[n]+”.’)]]]”, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
if (nodes != null){
for ( var m = 0 ; m < nodes.snapshotLength ; m++ ){
var node = nodes.snapshotItem(m);
node.removeChild(node.firstChild);
var newnode = document.createElement(’td’);
newnode.setAttribute(”valign”,”top”);
newnode.setAttribute(”class”,”line”);
newnode.setAttribute(”class”,”line”);
newnode.setAttribute(”height”,”100%”);
newnode.setAttribute(”style”,”padding-top: 10px;”);
var str = unescape(”***%20%u4F5C%u8005%u7684%u4E00%u5207%u4E0D%u5B58%u5728%u4E8E%u4F60%u7684%u548C%u8C10%u4E16%u754C%20***”);
newnode.appendChild(document.createTextNode(str));
node.appendChild(newnode);
}
}
}
}
}

blockbyuid();
====================================================================================================

3、opera + user js
另存为xxx.js,utf-8编码,uid自行添加

[Copy to clipboard] [ - ]

CODE:

// ==UserScript==
// @include http://bbs.stage1st.com/*
// @exclude *
// ==/UserScript==

var BlockedUIDList = new Array(
// 在此添加塞抹布的uid,别漏掉逗号
0,
1
);

function blockbyuid(){
for ( var n = 0 ; n < BlockedUIDList.length ; n++ ){
var nodes = document.selectNodes(”/html/body/center/div/form/div/table/tbody/tr/td[2]/table/tbody/tr[2][../../../../td[1]//a[@href[contains(.,'uid-"+BlockedUIDList[n]+”.’)]]]”);
if (nodes != null){
for ( var m = 0 ; m < nodes.length ; m++ ){
nodes[m].removeChild(nodes[m].firstChild);
var newnode = document.createElement(’td’);
newnode.setAttribute(”valign”,”top”);
newnode.setAttribute(”class”,”line”);
newnode.setAttribute(”class”,”line”);
newnode.setAttribute(”height”,”100%”);
newnode.setAttribute(”style”,”padding-top: 10px;”);
var str = unescape(”***%20%u4F5C%u8005%u7684%u4E00%u5207%u4E0D%u5B58%u5728%u4E8E%u4F60%u7684%u548C%u8C10%u4E16%u754C%20***”);
newnode.appendChild(document.createTextNode(str));
nodes[m].appendChild(newnode);
}
}
}
}

document.addEventListener(”DOMContentLoaded”,blockbyuid,false);
[ 本帖最后由 aaaa007cn 于 2007-7-27 20:31 编辑 ]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*


为了防止恶意的垃圾评论脚本,请输入以下图片里面的数学方程式的答案。
防垃圾评论问题