intro to algo

"intro to algo"

Stan na 29-06-2021. Zobacz najnowsza wersja.

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         intro to algo
// @namespace    http://tampermonkey.net/
// @version      0.2.5
// @description  "intro to algo"
// @author       You
// @match        http://staff.ustc.edu.cn/~csli/graduate/algorithms/*
// @icon         https://www.google.com/s2/favicons?domain=ustc.edu.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var body = document.getElementsByTagName('body');
    body[0].style.cssText = 'max-width: 50%;    padding-left: 25%;    text-align: justify;    font-size: 20px;    background-color: #272822;    color: #e6db74;font-family: verdana; filter: brightness(0.80); text-indent: 40px; line-height: 60px';

    var h1_list = document.getElementsByTagName('h1');
    for(let i = 0; i<h1_list.length;i++){h1_list[i].style.color = '#48b22b'};

    var h2_list = document.getElementsByTagName('h2');
    for(let i = 0; i<h2_list.length;i++){h2_list[i].style.color = '#48b22b'};

    var h4_list = document.getElementsByTagName('h4');
    for(let i = 0; i<h4_list.length;i++){h4_list[i].style.color = '#bdbdbd'};

    var b_list = document.getElementsByTagName('b');
    for(let i = 0; i<b_list.length;i++){b_list[i].style.color = '#59d9ef'};

    var pre_list = document.getElementsByTagName('pre');
    for(let i = 0; i<pre_list.length;i++){
        var pre_list_italic = pre_list[i].getElementsByTagName('i');
        for(let j = 0; j<pre_list_italic.length;j++){
            pre_list_italic[j].style.color = '#fd971f'
        }

    }

    body[0].innerHTML = body[0].innerHTML.replaceAll('<img src="../images/lftwdchv.gif">','<a style="color:#48b22b">(');
    body[0].innerHTML = body[0].innerHTML.replaceAll('<img src="../images/wdrtchv.gif">',')</a>');
    body[0].innerHTML = body[0].innerHTML.replaceAll('<img src="../images/arrlt12.gif">','←');
})();