Skip to content

Instantly share code, notes, and snippets.

@akameco
Created March 26, 2020 10:19
Show Gist options
  • Save akameco/e6e2a30a16b037dd42c642fcbadf31bc to your computer and use it in GitHub Desktop.
Save akameco/e6e2a30a16b037dd42c642fcbadf31bc to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name pre-notranslate
// @namespace akameco.github.io
// @version 0.1
// @description Do not translate inside pre
// @author akameco
// @match *
// @grant none
// ==/UserScript==
document.addEventListener("DOMContentLoaded", () => {
for (const element of Array.from(document.getElementsByTagName("pre"))) {
element.classList.add("notranslate");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment