Skip to content

Instantly share code, notes, and snippets.

@ergolyam
Last active August 22, 2026 19:55
Show Gist options
  • Select an option

  • Save ergolyam/dbdc39229102eecd29c04c64be68c337 to your computer and use it in GitHub Desktop.

Select an option

Save ergolyam/dbdc39229102eecd29c04c64be68c337 to your computer and use it in GitHub Desktop.
Fixes a bug in the DeepL CloudFlare Challenge in the Firefox browser
// ==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