Skip to content

Instantly share code, notes, and snippets.

@Amzd
Created May 6, 2026 14:16
Show Gist options
  • Select an option

  • Save Amzd/1f7e15bc4393151c50067bd28c36a019 to your computer and use it in GitHub Desktop.

Select an option

Save Amzd/1f7e15bc4393151c50067bd28c36a019 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Enable translation on Mastodon
// @namespace http://tampermonkey.net/
// @version 2026-05-06
// @description Remove 'notranslate' class from #mastodon
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function fix() {
const el = document.getElementById('mastodon');
if (el && el.classList.contains('notranslate')) {
el.classList.remove('notranslate');
}
}
// Run once
fix();
// Run again if the page updates dynamically
const observer = new MutationObserver(fix);
observer.observe(document.body, { childList: true, subtree: true });
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment