Last active
August 22, 2026 19:55
-
-
Save ergolyam/dbdc39229102eecd29c04c64be68c337 to your computer and use it in GitHub Desktop.
Fixes a bug in the DeepL CloudFlare Challenge in the Firefox browser
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 DeepL challenge fix | |
| // @namespace local.deepl.fix | |
| // @version 0.1 | |
| // @description Fixes a bug in the DeepL CloudFlare Challenge in the Firefox browser | |
| // @match *://www.deepl.com/* | |
| // @sandbox raw | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const cleanup = () => { | |
| const inertElements = document.querySelectorAll('[inert]') | |
| const widgetElement = document.querySelector('#challenge-widget') | |
| if (!inertElements.length && !widgetElement) return; | |
| console.log(`Inert count: ${inertElements.length}`); | |
| console.log(`Widget removed: ${!!widgetElement}`); | |
| widgetElement?.remove(); | |
| inertElements.forEach(el => { | |
| el.inert = false; | |
| el.removeAttribute('inert'); | |
| }); | |
| }; | |
| new MutationObserver(cleanup).observe(document.documentElement, { | |
| subtree: true, | |
| childList: true, | |
| attributes: true, | |
| attributeFilter: ['inert'] | |
| }); | |
| cleanup(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment