不要翻译github上的代码

避免google网页翻译github```<pre>```标签内的内容

目前为 2019-01-13 提交的版本。查看 最新版本

// ==UserScript==
// @name         不要翻译github上的代码
// @namespace    http://floatsyi.com/
// @version      0.1
// @description  避免google网页翻译github```<pre>```标签内的内容
// @author       floatsyi
// @match         *
// @include      *://github.com*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
     var pres = document.querySelectorAll('pre')
     pres.forEach(function(pre){
       if(!pre.querySelector('code')) pre.innerHTML = '<code>' + pre.innerHTML + '</code>'
     })
})();