// ==UserScript== // @name DeepL Footer remover // @namespace http://tampermonkey.net/ // @version 0.1 // @description Remove footer from DeepL website // @match https://www.deepl.com/* // @license Unlicense // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Configuration object for target elements const TARGETS = { footer: 'footer', header: '.relative.bg-neutral-next-50 > .mobile\\:hidden' }; /** * Removes specified elements from the page */ function removeElements() { Object.entries(TARGETS).forEach(([key, selector]) => { const element = document.querySelector(selector); if (element) { element.remove(); console.log(`${key} removed`); } }); } /** * Initializes the script */ function init() { // Remove elements on initial page load removeElements(); // Set up MutationObserver to handle dynamic content const observerConfig = { childList: true, subtree: true }; const observer = new MutationObserver(removeElements); observer.observe(document.body, observerConfig); console.log('DeepL Footer Remover initialized'); } // Run the initialization function when the script loads init(); })();