Filed under: 程序 |
Posted on 三月 3rd, 2009 由 owen
本来一直用 greasemonkey上的一个去除gmail广告的插件,挺好的。
今天突然发现gmail的内部html代码结构变化了,插件不能用了。
而且有消息说,gmail 封杀 greasemonkey,如果使用这个,将会被封账户,不过不知道消息是否可靠。
在原来代码的基础上,稍微改动一下,即可去掉gmail广告
安装地址:http://userscripts.org/scripts/show/43495
// ==UserScript==
// @name GMail Without Ads and Hidden Spam count!
// @version 1.05
// @description Html structure change because of gmail,GMail without ads, simple as it!
// @author MDK (http://www.d5s.cn/archives/126) - based on original GMail in Blue: Professional skin from jbmarteau
// * 1.01 - Thanks to kris7topher for fix the border on the right
// * 1.02 - Fixed the overriding problem with large subjects
// * 1.03 - Fixed the overriding problem with Html structure change because of gmail
// * 1.04 - Add Hidden spam count
// * 1.05 - Fix bug with gmail html changed
// @include http://mail.google.com/*
// @include https://mail.google.com/*
// @include http://*.mail.google.com/*
// @include https://*.mail.google.com/*
// ==/UserScript==
(function() {
var css = "table[class='T1HY1 nH iY'] tr td[class='tELAdc']:last-child{display:none !important;}div[class='p5 qa'] a[class='qh']{visibility:hidden;}div[class='p5 qa'] a[class='qh']::before{content:'Spam';visibility:visible;font-weight:400;text-decoration:underline;}";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
})();
阅读次数: 2222

为了让gmail更久更稳定的为我们免费服务,偶而我会故意点一下广告
如果人人都去掉广告….
gmail 的伟大,并不是靠这点广告换来的,gmail里面的广告和邮件内容做到了匹配,应该也算是是精准广告了,如果喜欢可以不去掉,毕竟greasemonkey这些东西,并不是给普通人用的。
试试我的stylish:http://userstyles.org/styles/15631
代码分析:http://ytzong.blogspot.com/2009/03/stylishgmail.html
ytzong 的代码更好一些,值得推荐。
嗯 支持一下~~