|
// ==UserScript== |
|
// @name You need more social credit |
|
// @description Xi |
|
// @include https://www.unknowncheats.me/* |
|
// ==/UserScript== |
|
(function() { |
|
'use strict'; |
|
|
|
var words = { |
|
'Reputation': 'Social Credit', |
|
'Rep Power': 'CCP Influence', |
|
'is likely going to get banned': 'is an threat to the glorious nation of China and will soon disappear', |
|
'is becoming a waste of our time': 'had to take a social credit loan', |
|
'is looking at C++ For dummies': 'is reading the Social Credit handbook', |
|
'has made posts that are generally average in quality': 'is under the radar of the glorious nation of China', |
|
'is an oracle in the cheating community': 'Shaolin monks pray to this man for guidance', |
|
'rep takes up 1 gig of server space': 'The Great Firewall of China has dedicated 32 servers to protect him', |
|
'has learned Kazaa is not a third world country': 'has learned that Korea is not part of China', |
|
'has reputation that takes up 1GB of server space': 'The Great Firewall of China has dedicated 32 servers to protect him', |
|
'has reputation that takes up 2GB of server space!': 'The Great Firewall of China has dedicated 64 servers to protect him', |
|
'is a legend in the cheating community': 'is known by all Chinese people as rich in social credit', |
|
'This man endangers the world': 'Xi\'s lineage', |
|
'DEFINES UNKNOWNCHEATS': 'Xi\'s lineage' |
|
}; |
|
|
|
var word,text,texts,i,userRegexp,regexs=[],replacements=[],tagsWhitelist=["PRE","BLOCKQUOTE","CODE","INPUT","BUTTON","TEXTAREA"],rIsRegexp=/^\/(.+)\/([gim]+)?$/;function prepareRegex(e){return e.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g,"\\$1")}function isTagOk(e){return-1===tagsWhitelist.indexOf(e)}for(word in words)"string"==typeof word&&words.hasOwnProperty(word)&&((userRegexp=word.match(rIsRegexp))?regexs.push(new RegExp(userRegexp[1],"g")):regexs.push(new RegExp(prepareRegex(word).replace(/\\?\*/g,function(e){return"\\*"===e?"*":"[^ ]*"}),"g")),replacements.push(words[word]));for(texts=document.evaluate('//body//text()[ normalize-space(.) != "" ]',document,null,6,null),i=0;text=texts.snapshotItem(i);i+=1)isTagOk(text.parentNode.tagName)&®exs.forEach(function(e,t){text.data=text.data.replace(e,replacements[t])}); |
|
|
|
}()); |