Skip to content

Instantly share code, notes, and snippets.

@wallopthecat
Created August 29, 2019 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wallopthecat/3586d255ab398935100d426b256bfb44 to your computer and use it in GitHub Desktop.
Save wallopthecat/3586d255ab398935100d426b256bfb44 to your computer and use it in GitHub Desktop.
you need more social credit
// ==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)&&regexs.forEach(function(e,t){text.data=text.data.replace(e,replacements[t])});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment