KTANE Manual Renamer

Rename some of the alternate manuals to a more descriptive title.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         KTANE Manual Renamer
// @namespace    https://matthewmccaskill.ml/
// @version      1.1
// @description  Rename some of the alternate manuals to a more descriptive title.
// @author       ZekNikZ
// @match        https://ktane.timwi.de/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var observer = new MutationObserver(function(mutations) {
	    // For the sake of...observation...let's output the mutation to console to see how this all works
	    mutations.forEach(function(mutation) {
		    console.log(mutation.type);
	    });

        $('.manual-select > a > li').each(function(e){
            $(this).text($(this).text().replace(/embellished/g, 'manual with some extra blah put in')
                     .replace(/translated full/g, 'manual with different-looking blah instead')
                     .replace(/translated/g, 'manual with some different-looking blah instead')
                     .replace(/cheat sheet/g, 'manual with all of the blah cut out')
                     .replace(/blank sheet/g, 'manual with some of the blah erased')
                     .replace(/steps skipped/g, 'manual with some of the blah done already')
                     .replace(/optimized/g, 'manual with with some better blah instead')
                     .replace(/rearranged/g, 'manual with the blah in a different order')
                     .replace(/original/g, 'manual with the original blah instead')
                     .replace(/lookup table/g, 'manual with all of the blah done already in table form')
                     .replace(/card reference/g, 'manual with some of the blah explained')
                     .replace(/names/g, 'manual with some of the blah named')
                     .replace(/colored/g, 'manual with some of the blah in color')
                     .replace(/interactive/g, 'manual with interactive blah')
                     .replace(/reworded/g, 'manual with some different blah instead')
                     .replace(/flipped/g, 'manual with the blah flipped')
                     .replace(/condensed/g, 'manual with some of the blah cut out'));
        });
    });
    observer.observe(document.body, {attributes: false, childList: true, characterData: false});
})();