Last active
April 2, 2020 03:16
-
-
Save ginokent/50292ffaef9f6deb952a4aed8b625a67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name notranslate | |
// @namespace https://gist.github.com/djeeno/50292ffaef9f6deb952a4aed8b625a67 | |
// @version 0.1 | |
// @description notranslate | |
// @author djeeno | |
// @match * | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if (location.hostname === 'github.com' || location.hostname === 'gist.github.com' || location.hostname === 'gitlab.com' || location.hostname == 'medium.com') { | |
Array.prototype.forEach.call(document.getElementsByClassName('content'), x => x.classList.add('notranslate')) | |
Array.prototype.forEach.call(document.getElementsByClassName('file'), x => x.classList.add('notranslate')) | |
Array.prototype.forEach.call(document.getElementsByClassName('final-path'), x => x.classList.add('notranslate')) | |
Array.prototype.forEach.call(document.getElementsByTagName('pre'), x => x.classList.add('notranslate')) | |
} | |
if (location.hostname === 'blog.discordapp.com') { | |
Array.prototype.forEach.call(document.getElementsByTagName('iframe'), x => x.classList.add('notranslate')) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment