DeepL Pause - pause logo strip

Automatically pauses the logo carousel on deepl.com on page load.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name           DeepL Pause - pause logo strip
// @name:cs        DeepL Pause - zastav pruh s logy
// @namespace      http://tampermonkey.net/
// @version        1.0
// @description    Automatically pauses the logo carousel on deepl.com on page load.
// @description:cs Automaticky zastaví pohyb pruhu s logy na stránkách deepl.com při načtení stránky.
// @author         Sparrownest
// @match          https://www.deepl.com/*
// @icon           https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant          none
// @license        MIT
// ==/UserScript==

(function () {
  'use strict';

  function tryPause() {
    const btn = document.querySelector('[data-testid="logo-cloud-play-pause-button"]');
    if (btn && btn.getAttribute('aria-pressed') === 'true') {
      btn.click();
      return true;
    }
    return false;
  }

  // The button may not exist immediately — observe the DOM until it appears
  const observer = new MutationObserver(() => {
    if (tryPause()) {
      observer.disconnect();
    }
  });

  observer.observe(document.body, { childList: true, subtree: true });

  // Also try immediately and with a small delay as a fallback
  tryPause();
  setTimeout(() => {
    if (tryPause()) observer.disconnect();
  }, 2000);
})();