Greasy Fork

Greasy Fork is available in English.

谷歌翻译跳过代码片段

谷歌翻译 翻译此页功能跳过代码片段

目前为 2019-09-24 提交的版本。查看 最新版本

// ==UserScript==
// @name         谷歌翻译跳过代码片段
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  谷歌翻译 翻译此页功能跳过代码片段
// @author       n3taway
// @match        *://*/*
// @license      MIT
// @grant        none
// ==/UserScript==
/*jshint esversion: 6 */
(function () {
    'use strict';
    const nodeNames = [
        'pre',//常规代码片段 例如github
    ];
    nodeNames.forEach((name)=>{
       [...document.querySelectorAll(name)].forEach( node => {
           node.classList.add('notranslate')
       })
    });
})();Y