V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cuthead
V2EX  ›  macOS

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

  •  
  •   cuthead · Apr 22, 2015 · 3684 views
    This topic created in 4029 days ago, the information mentioned may be changed or developed.
    如何去除这个东西,能不能通过过滤JS去掉它?
    5 replies    2015-05-04 09:52:53 +08:00
    cuthead
        1
    cuthead  
    OP
       Apr 22, 2015
    好像是这个
    http://translate.google.com/translate_a/element.js?cb=window.google_tr
    但优酷随机不显示这个,奇怪
    crown
        2
    crown  
       Apr 23, 2015
    options里面没有don't translate this site/page的选项?
    wwwjfy
        3
    wwwjfy  
       Apr 23, 2015
    我也碰到这个问题,看了看优酷的js,可以通过cookie控制是否显示
    开console,执行

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

    就不会出现了,1000是cookie的过期天数
    alangz
        4
    alangz  
       Apr 24, 2015
    我也遇到过这个问题,option里面可以关闭,不翻译这个页面。
    cuthead
        5
    cuthead  
    OP
       May 4, 2015
    我找到了,在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 之,好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2661 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 02:56 · PVG 10:56 · LAX 19:56 · JFK 22:56
    ♥ Do have faith in what you're doing.