|
阅读:4125回复:7
清理163新闻和技术版面的greasemonkey脚本
清理163新闻和技术版面的greasemonkey脚本,
清理得十分彻底,适合对整洁有特殊怨念的人使用. 还没有完工,只是个半成品. 谁有更好的方法,请在下面跟贴. 最近一个月要考试,所以这个东西先放在这里测试,为期一个月. 等考完试我再来修改它. 建议与adblock一起使用,adblock的规则列表见 http://wiki.mozcn.org/index.php/Firefox:Adblock_Filters //
// Copyright (c) 2006, drsu
// Published Under GPL License
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// This User Script must work with adblock.
// And you have to go http://wiki.mozcn.org/index.php/Firefox:Adblock_Filters for the filters.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name 163 cleaner
// @namespace http://www.firefox.net.cn
// @description clean everything.
// @include http://news.163.com/*
// @include http://tech.163.com/*
// @version 0.0.1
// ==/UserScript==
var allItems, thisItem;
allItems = document.evaluate("//div[contains(@class,'ad')]|//div[contains(@class,'channel')]|//div[contains(@class,'endReview')]|//div[contains(@class,'av')]|//div[contains(@class,'men')]|//div[@class='col2']|//div[@class='col3']|//div[@class='foot']|//div[@class='attention']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < allItems.snapshotLength; i++) {
thisItem = allItems.snapshotItem(i);
if (thisItem) {
thisItem.parentNode.removeChild(thisItem);
}
} |
|
|
1楼#
发布于:2006-05-20 01:11
在2.0a3中怎么无法安装了。
|
|
|
2楼#
发布于:2006-05-20 01:11
最郁闷的是要下载完才能起作用,能不能边下载边改变呢?
|
|
|
3楼#
发布于:2006-05-20 01:11
JS的效果更好一些,试试就知道了
|
|
|
|
4楼#
发布于:2006-05-20 01:11
163 不需要什么脚本吧?Adblock plus就全部搞定了。
|
|
|
5楼#
发布于:2006-05-20 01:11
很少上163看新闻,纯支持!
|
|
|
|
6楼#
发布于:2006-05-20 01:11
虽然从来不上那几个所谓的门户网站,不过还是要支持的!
|
|
|
7楼#
发布于:2006-05-20 01:11
主要是删掉了class中含有下列文字的div:
ad channel col2 col3 foot attention endReview Nav nav menu Commend 其中有一些作了合并, 比如menu和Commend合并为men |
|
