greasemonkey的linuxpk页面显示脚本[firefox/iepro?]
去除掉了侧栏,关键是我个人比较少关注侧栏的最新贴子,etc而且在看文章的时候有侧栏时显示的内容太窄了,因此就有这个想法,如果大家有什么自定义设置也可以提出来,我会更新的。
还有就是希望大家多多发技术文章,好让我多学学。
脚本代码:[code]
// ==UserScript==
// @name linuxpk fix
// @namespace goo
// @description show what i want
// @include http://bbs.linuxpk.com/index.html
// @exclude
// ==/UserScript==
function hide(elems) {
for (i = 0, length = elems.length; i < length; i++) {
if (elems[i] != null) {
elems[i].style.display="none";
}
}
}
function $(selector) {
type = ((typeof arguments[1] != 'undefined') ? arguments[1] : "id");
if (type=="id") {
return [document.getElementById(selector)];
} else {
return document.getElementsByClassName(selector);
}
}
hide($('infoside'));
hide($('announcement'));
hide($('legend','class'));
hide($('ad_column','class'));
//hide($('box', 'class'));
hide($('footer'));
$('infosidemain')[0].style.width="100%";
[/code]附效果图
首页顶部显示:
[attach]4133[/attach]
首页底部显示:
[attach]4134[/attach]
查看贴子页面:
[attach]4132[/attach]
页:
[1]