UnSnow 2

Вторая версия UserScript UnSnow, убирающего декоративный снег с веб-страниц.

Исходный текст восстановлен из заметки «UnSnow 2».

// ==UserScript==
// @name         UnSnow
// @author       Evgeny Stepanischev aka Bolk
// @version      2024-12-31
// @namespace    /files/unsnow2.js
// @description  Turn off stupid snow
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    if (window.location.hostname === 'aliexpress.ru') {
        return;
    }

    Array.from(document.querySelectorAll('*')).forEach(e => {
        for (let a of e.attributes) {
            if (/(?<!un)snow/i.test(a.name + a.value)) {
                e.style = 'visibility:hidden;position:absolute;margin-left:-10000px;' +
                          'display:none;transform:translateX(-100vw);opacity:0';
            }
        }
    });
})();