Skip to content

Instantly share code, notes, and snippets.

@ahuglajbclajep
Last active November 21, 2020 18:33
Show Gist options
  • Save ahuglajbclajep/6aaf97793880cdc5b4ee5697cdef2616 to your computer and use it in GitHub Desktop.
Save ahuglajbclajep/6aaf97793880cdc5b4ee5697cdef2616 to your computer and use it in GitHub Desktop.
my UserScripts for Tampermonkey
// ==UserScript==
// @name google translate ignore
// @version 0.2
// @description Ignore code blocks with google translation.
// @match *://*/*
// ==/UserScript==
const github = ['table.js-file-line-container', 'table.js-diff-table'];
const selector = ['pre'].concat(github).join(', ');
// see https://webmasters.googleblog.com/2008/10/helping-you-break-language-barrier.html
document.querySelectorAll(selector).forEach(e => e.classList.add('notranslate'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment