Cancelence

AtCoderのコンテストのカスタムCSSを無効化します

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Cancelence
// @namespace    https://atcoder.jp
// @version      0.1
// @description  AtCoderのコンテストのカスタムCSSを無効化します
// @author       Yukkku
// @match        https://atcoder.jp/contests/*/*
// @icon         https://atcoder.jp/favicon.ico
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(() => {
    'use strict';
    const d = ()=>{
        const v = document.querySelector('head>style:first-of-type');
        if (v) {
            v.innerHTML = '';
            observer.disconnect();
        }
    };
    d();
    const observer = new MutationObserver(d);
    observer.observe(document.documentElement ,{ attributes: true, childList: true, subtree: true });
    addEventListener('DOMContentLoaded', () => {
        observer.disconnect();
    });
})();