Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- // 5317 = forsenE
- // 5318 = gachiBass
- // 5319 = forsenDespair
- // 5320 = forsenBased
- // 5321 = OMEGALUL
- // 5322 = megaLUL
- // 5323 = forsenCope / Copesen
- // 5324 = PagMan
- // 5325 = Sadeg
- // 5326 = forsenCD
- // 5327 = BatChest
- // 5330 = :tf: / Trollface
- // 5331 = Clueless
- // 5332 = monkaOMEGA
- // 5333 = WutFace
- // 5334 = cmonBruh
- // 5335 = pepeLaugh
- // 5336 = FeelsOkayMan
- // 5359 = forsen as doc
- // 5360 = LULE
- var emotes = {
- ":5317:": "https://reddit-econ-prod-assets-permanent.s3.amazonaws.com/asset-manager/t5_33td5/AT7s0VNX3k.png",
- ":5323:": "https://reddit-econ-prod-assets-permanent.s3.amazonaws.com/asset-manager/t5_33td5/35Audg7pV4.png",
- "emote_key": "image_link" // add your emotes here
- };
- var emoteMatcher = Object.keys(emotes).join('|');
- var emoteSize = 20; //change these if you want the emotes to be bigger or smaller, it's 20 on new reddit so i just used that
- Array.from(document.getElementsByTagName("p")).forEach(function (elem) {
- var html = elem.innerHTML;
- var emoteMatches = html.match(new RegExp(emoteMatcher, 'g'));
- if (emoteMatches) {
- emoteMatches.forEach(function (possibleEmote) {
- if (emotes.hasOwnProperty(possibleEmote))
- html = html.replace(possibleEmote, `<img src="${emotes[possibleEmote]}" width="${emoteSize} height="${emoteSize}">`);
- });
- elem.innerHTML = html;
- }
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement