Created
May 6, 2026 14:16
-
-
Save Amzd/1f7e15bc4393151c50067bd28c36a019 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 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