No Animations

Clear all animations on websites

Per 23-10-2023. Zie de nieuwste versie.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

// ==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);