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.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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