Skip to content

Instantly share code, notes, and snippets.

@rishubil
Last active August 8, 2024 03:03
Show Gist options
  • Save rishubil/e0ac6c16334e63abe9064323afb29d4c to your computer and use it in GitHub Desktop.
Save rishubil/e0ac6c16334e63abe9064323afb29d4c to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Add notranslate class on Hacker News
// @description Add notranslate class on Hacker News
// @version 0.0.2
// @match https://news.ycombinator.com/*
// @updateURL https://gist.github.com/rishubil/e0ac6c16334e63abe9064323afb29d4c/raw/notranslate-hackernews.user.js
// @downloadURL https://gist.github.com/rishubil/e0ac6c16334e63abe9064323afb29d4c/raw/notranslate-hackernews.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.querySelectorAll(".subline").forEach((element) => {element.classList.add("notranslate")})
document.querySelectorAll(".sitebit").forEach((element) => {element.classList.add("notranslate")})
document.querySelectorAll(".comhead").forEach((element) => {element.classList.add("notranslate")})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment