Created
July 3, 2017 20:59
-
-
Save anonymous/583ec369250141652d5e9ef3e9217467 to your computer and use it in GitHub Desktop.
Greasemonkey script that replaces pinyin cultivation levels in BTTH with literal translations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name BTTH name rationalizer | |
// @description Replaces annoying af (imo) pinyin cultivation levels in BTTH with literal translations | |
// @namespace http://www.wuxiaworld.com/ | |
// @match http://www.wuxiaworld.com/btth-index/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var replacementPairs = [ | |
[/(\W)Da\s+Dou\+Shi(s?\W)/g, "$1Grand Master$2"], | |
[/(\W)Ban\s+Sheng(s?\W)/g, "$1Half Saint$2"], | |
[/(\W)Dou(\W)/gi, "$1Battle$2"], | |
[/(\W)Qi(\W)/g, "$1Energy$2"], | |
[/(\W)Zhi(s?\W)/g, "$1Disciple$2"], | |
[/(\W)Zhe(s?\W)/g, "$1Practitioner$2"], | |
[/(\W)Shi(s?\W)/g, "$1Master$2"], | |
[/(\W)Ling(s?\W)/g, "$1Spirit$2"], | |
[/(\W)Wang(s?\W)/g, "$1King$2"], | |
[/(\W)Huang(s?\W)/g, "$1Emperor$2"], | |
[/(\W)Zong(s?\W)/gi, "$1Ancestor$2"], | |
[/(\W)Zhun(s?\W)/g, "$1Venerate$2"], | |
[/(\W)Sheng(s?\W)/g, "$1Saint$2"], | |
[/(\W)Di(s?\W)/g, "$1God$2"] | |
]; | |
var temp = document.body.innerHTML | |
replacementPairs.forEach(function(item, index, array){ | |
temp = temp.replace(item[0], item[1]); | |
}); | |
document.body.innerHTML = temp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment