用于更改“收件箱"的Greasemonkey脚本. “测试"在Yahoo Mail [英] Greasemonkey script for changing "inbox" to "test" at yahoo mail

查看:141
本文介绍了用于更改“收件箱"的Greasemonkey脚本. “测试"在Yahoo Mail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Greasemonkey脚本,我想将链接收件箱"更改为测试",它可能在AJAX中.怎么做?拉姆

with Greasemonkey script, I would like to change the link "inbox" to "test", it's probably in AJAX. How to do it? Ram

从OP备注更新,如下:

我是新手,有人可以写脚本将Yahoo Mail上的收件箱"改为测试"吗? (安迪的脚本对我不起作用)

Well i'm a newbie, could some one please write the script to change the word "inbox" to "test" on yahoo mail? (Andy's script didn't work for me)

推荐答案

更新:我只在主要的Yahoo帐户(位于英国域)上测试了该脚本.当然,雅虎在不同国家/地区使用明显不同的代码.

Update: I had only tested the script on my main Yahoo account which is on the UK domain. Of course, Yahoo uses markedly different code for different countries.

下面的脚本已更新,可以在美国域和(可能/希望)大多数英文版的Yahoo版本上工作.

The script, below has been updated to work on the US domain and (probably/hopefully) most Yahoo editions in English.

我是新手,有人可以写脚本以将yahoo邮件上的收件箱"一词更改为测试" 吗?

好吧,由于该脚本需要60秒钟的编写时间和60秒钟的测试时间,因此这里是...

Well, since that script took 60 seconds to write and 60 seconds to test, here it is...

/*  Save this file as "YaHellFoo.user.js".   Then open it (Ctrl-O) with Firefox and
    let Greasemonkey install it.
*/

// ==UserScript==
// @name           Dirt Simple Demo, just uses jQuery to change the "Inbox" link to "test".
// @namespace      YaHell
// @include        http://*.mail.yahoo.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==

if (window.top != window.self)  //don't run on frames or iframes
    return;


$(document).ready (Greasemonkey_main);


function Greasemonkey_main ()
{
    $("a:contains('Inbox')").each
    (
        function (index)
        {
            var jNode   = $(this);
            if (jNode.text()  ==  "Inbox")
                jNode.text("test")
        }
    );

    //-- Different countries' YaHell instances display Inbox with different code!
    $("span:contains('Inbox')").each
    (
        function (index)
        {
            var jNode   = $(this);
            if (jNode.text()  ==  "Inbox")
                jNode.text("test")
        }
    );
}

这篇关于用于更改“收件箱"的Greasemonkey脚本. “测试"在Yahoo Mail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆