add a Google Translate plug-in to the page
在网页左下角嵌入一个 Google 翻译小部件。
默认情况需要在鼠标右键菜单中执行此脚本。
一些网站会设置 CSP 限制,导致不能在页面上加载其他来源的 script 脚本,比如 Github。
这时网页左下角会有加载失败提示,同时控制台会出现如下的报错:Refused to load the script 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit' because it violates the following Content Security Policy directive: ...。
名称 填 移除 CSP 响应头,规则类型 为 修改响应头,匹配类型 为 全部,执行类型 为 常规,头名称 填 content-security-policy,头内容 填 _header_editor_remove_,最后点击 保存。