Web for Old PCs

A versatile script designed to make the internet more accessible for older computers. It removes heavy elements and simplifies the layout.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Web for Old PCs
// @name:uk      Веб для старих ПК
// @version      1.0
// @description:uk  Універсальний скрипт, призначений для того, щоб зробити Інтернет більш доступним для старих комп’ютерів. Він видаляє об’ємні елементи та спрощує макет.
// @description  A versatile script designed to make the internet more accessible for older computers. It removes heavy elements and simplifies the layout.
// @author       smoochie
// @match        *://*/*
// @run-at       document-start
// @grant        none
// @license      MIT
// @namespace https://greasyfork.org/users/1598851
// ==/UserScript==

(function() {
    'use strict';

    const style = document.createElement('style');
    style.innerHTML = `

        iframe, [id*="google_ads"], [class*="adv"], [id*="banner"] {display: none !important;}
        object, embed {display: none !important;}
        *, *::before, *::after {
            animation: none !important;
            transition: none !important;
            transition-duration: 0s !important;
            scroll-behavior: auto !important;
        }

        * {
            border-radius: 0 !important;
            box-shadow: none !important;
            text-shadow: none !important;
            outline-offset: -1px !important;
        }

        * {
            backdrop-filter: none !important;
            filter: none !important;
            background-attachment: scroll !important;
        }


        body {background-image: none !important;background-color: #f0f0f0 !important; }
        iframe { display: none !important; }
        body, input, button, textarea {font-family: Arial, sans-serif !important;}
        [style*="opacity"] {opacity: 1 !important;}
    `;


    if (document.head) {
        document.head.appendChild(style);
    } else {
        const observer = new MutationObserver(() => {
            if (document.head) {
                document.head.appendChild(style);
                observer.disconnect();
            }
        });
        observer.observe(document.documentElement, { childList: true });
    }


    window.addEventListener('load', () => {
        document.querySelectorAll('video').forEach(v => {
            v.pause();
            v.preload = 'none';
        });
    });
})();