在 Chrome中不翻译代码
// ==UserScript==
// @name Chrome 不翻译代码
// @namespace https://github.com/wuuashen/UserScript
// @version 0.1
// @description 在 Chrome中不翻译代码
// @author wuuashen
// @include *
// @grant none
// ==/UserScript==
(function() {
'use strict';
['code', 'pre']
.reduce((acc, cur) => {
const nodeList = document.querySelectorAll(cur);
return [...acc, ...nodeList];
}, [])
.forEach(elm => {
elm.classList.add('notranslate');
elm.setAttribute('translate', 'no');
});
console.log('😃 No translate class inject success.');
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址