No Animations

Clear all animations on websites

Από την 23/10/2023. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        No Animations
// @namespace   No Animations Script
// @version     2.9
// @description Clear all animations on websites
// @author      Nameniok
// @match       *://*/*
// @license     MIT
// @grant       GM_addStyle
// @grant       unsafeWindow
// ==/UserScript==

const isSameOrigin = (url) => {
  const currentOrigin = window.location.origin;
  return url.startsWith(currentOrigin);
};

GM_addStyle(`
  * {
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    transition-timing-function: initial !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    animation-delay: none !important;
    animation-duration: none !important;
    -webkit-animation-delay: 0 !important;
    -webkit-animation-duration: 0 !important;
    -moz-animation-delay: 0 !important;
    -moz-animation-duration: 0 !important;
    -o-animation-delay: 0 !important;
    -o-animation-duration: 0 !important;
    scroll-behavior: auto !important;
    marquee-style: none !important;
    -moz-scroll-behavior: auto !important;
    -moz-marquee-style: none !important;
  }

  *::before, *::after, *::hover, *::active {
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-timing-function: initial !important;
    -webkit-transition: none !important;
    animation-delay: none !important;
    animation-duration: none !important;
    -webkit-animation-delay: 0 !important;
    -webkit-animation-duration: 0 !important;
    -moz-animation-delay: 0 !important;
    -moz-animation-duration: 0 !important;
  }

  *:before, *:after, *:hover, *:active {
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-timing-function: initial !important;
    -webkit-transition: none !important;
    animation-delay: none !important;
    animation-duration: none !important;
    -webkit-animation-delay: 0 !important;
    -webkit-animation-duration: 0 !important;
    -moz-animation-delay: 0 !important;
    -moz-animation-duration: 0 !important;
  }

  input, textarea, button, select, div, a {
    -webkit-tap-highlight-color: transparent;
  }

  img[src^="https://i.ytimg.com/an_webp/"] {
    display: none !important;
  }

  img[src*="/hqdefault.jpg"] {
    display: initial !important;
  }

  @keyframes {
    from {

    }
    to {

    }
  }
`);

const blockedUrlPrefix = 'https://i.ytimg.com/an_webp/';
const blockImageLoading = (event) => {
  const src = event.target.src || '';
  if (src.startsWith(blockedUrlPrefix) || src.endsWith('.webp')) {
    event.preventDefault();
    event.target.style.display = 'none';
  }
};

unsafeWindow.addEventListener('beforeload', blockImageLoading, true);