V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cuthead
V2EX  ›  macOS

英文 Yosemite Safari 打开优酷,正上方显示 Google 翻译,何解?

  •  
  •   cuthead · 2015-04-22 22:52:41 +08:00 · 3083 次点击
    这是一个创建于 3291 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如何去除这个东西,能不能通过过滤JS去掉它?
    5 条回复    2015-05-04 09:52:53 +08:00
    cuthead
        1
    cuthead  
    OP
       2015-04-22 22:59:08 +08:00
    好像是这个
    http://translate.google.com/translate_a/element.js?cb=window.google_tr
    但优酷随机不显示这个,奇怪
    crown
        2
    crown  
       2015-04-23 00:28:35 +08:00
    options里面没有don't translate this site/page的选项?
    wwwjfy
        3
    wwwjfy  
       2015-04-23 00:32:23 +08:00
    我也碰到这个问题,看了看优酷的js,可以通过cookie控制是否显示
    开console,执行

    Nova.Cookie.set("googtrans_flag", 1, 1000);

    就不会出现了,1000是cookie的过期天数
    alangz
        4
    alangz  
       2015-04-24 13:57:39 +08:00
    我也遇到过这个问题,option里面可以关闭,不翻译这个页面。
    cuthead
        5
    cuthead  
    OP
       2015-05-04 09:52:53 +08:00
    我找到了,在common.js里有这句

    a.id = "id_google_tr", a.style.display = "none", r_panel = $$("body")[0], r_panel.insertBefore(a, r_panel.firstChild), Nova.addScript("//translate.google.com/translate_a/element.js?cb=window.google_tr"))

    AdBlock translate.google.com/translate_a/element.js?cb=window.google_tr 之,好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2839 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:32 · PVG 20:32 · LAX 05:32 · JFK 08:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.