简体   繁体   English

的意义是什么<script>window[“_GOOG_TRANS_EXT_VER”] = “1”;</script>

[英]What is the meaning of <script>window[“_GOOG_TRANS_EXT_VER”] = “1”;</script>

I have this code on the header of my page 我在页面的标题上有这个代码

    <script>window["_GOOG_TRANS_EXT_VER"] = "1";</script>

But i dont understand its meaning or from where it is generated, anyone knows anything ? 但我不明白它的意义或从它产生的地方,任何人都知道什么? I would like to delete this because it seems to be a problem in the page generation... 我想删除它,因为它似乎是页面生成中的一个问题...

Thank you for your help. 谢谢您的帮助。

This is dynamically inserted by the Google Translate extension (or other extensions that were based on the Google Translate extension) 这是由Google翻译扩展程序(或基于Google翻译扩展程序的其他扩展程序)动态插入的

The source code of the Google Translate extension specifically refers to it: Google翻译扩展程序的源代码专门指代它:

/* Copyright 2010 Google */
...
function v(a) {
    var b = {
        noEvents: c,
        content: u('window["_GOOG_TRANS_EXT_VER"] = "1";')
    };
    i.tabs.executeScript(a, {
        code: q(s, b)
    })
}
...

and disabling the extension removes it from the page. 并禁用该扩展程序将其从页面中删除。

Check the actions for your onClick event for in anchor tags, or another JavaScript action that is being fired. 检查onClick事件的操作以获取锚标记或其他正在触发的JavaScript操作。 it is most likely an escaped quote where there should not be an escape. 它很可能是逃避报价,不应该逃避。

该脚本所做的就是在全局范围内创建一个变量_GOOG_TRANS_EXT_VER,该范围的值为1.如果没有使用此变量,则不应该生成任何问题,但它似乎是由这样的Google小部件插入的。

Do you have the Google Translate plugin? 你有谷歌翻译插件吗? I saw the same thing and then tried turning my Translate plugin off and this line disappears. 我看到同样的事情,然后尝试关闭我的翻译插件,这条线消失了。

Assuming you are running Chrome, you can check/disable at chrome://extensions/ 假设您正在运行Chrome,则可以在chrome:// extensions /中检查/停用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM