Remove rounding

Removes rounding of all elements on all sites. | Прибирає срані заокруглення усіх елементів на всіх сайтах

当前为 2025-01-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         Remove rounding 
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description   Removes rounding of all elements on all sites. | Прибирає срані заокруглення усіх елементів на всіх сайтах
// @author       SergoZar
// @match        *://*/*
// @license GPL v2.0
// ==/UserScript==

(function() {
    'use strict';


    function add_style(e){
        var style = document.createElement("style");
        style.textContent = ` *{
            border-radius: 0 !important;

        }`;
        e.append(style);
    }
    add_style(document.head);

    // https://gist.github.com/Spencer-Doak/9954daae8a859337a08f0022293313a6
    function findRoots(ele) {
    return [ ele, ...ele.querySelectorAll('*') ]
        .filter(e => !!e.shadowRoot)
        .flatMap(e => [e.shadowRoot, ...findRoots(e.shadowRoot)])
    }
    findRoots(document.body).forEach( i => add_style(i) );
})();