1. 新建一个记事本文件,修改其后缀并重命名为:gmail.user.js
2. 打开新建的记事本,在其中输入如下代码:
// @name
给Gmail美容
(function() {
var css =
"
table.Bs.nH.iY td.Bu:last-child{position:absolute !important;top:-99999px
!important;right:0 !important;}.nH.pp.ps .pY{display: none
!important;} 此处插入其它要去掉组件的代码";
if (typeof GM_addStyle != "undefined")
{
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined")
{
PRO_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);
}
}
})();
3. 上面红色的代码为去除广告的代码,如果不想去掉广告,可以将这段代码删除。蓝色的代码为去掉邀请框的代码。如果还要去除其他的组件,可以将上面绿色的汉字替换在下面的代码。
.qq{display: none} /*隐藏左上角链接*/
.gb1{display: none} /*隐藏左上角Gmail*/
.nH.pY{display: none} /*隐藏邀请框*/
.mn{display: none} /*隐藏底部提示信息*/
.toxOdd{display: none} /*隐藏显示搜索选项和创建过滤器*/
.nH.qp{display: none}
/*隐藏顶部所有链接*/
.nH.fY{display: none} /*隐藏设置菜单*/
4. 上面粉红色的文字为在chrome里显示的扩展标题,这个文字可以任意修改。
5. 关闭并保存文件,在保存文件时,代码里的绿色汉字要删掉。
6. 打开一个chrome窗口,将这个 gmail.user.js 文件拖到chrome窗口中进行安装,安装完之后,登录gmail,就可以看到效果了。