Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Glyphs This has not gone well
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author Seblor
- // @match https://www.reddit.com/r/HFY/*oh_this_has_not_gone_well*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var obj = { "ᛜ": "Sight", "ᛝ": "Hearing", "ᛃ": "Taste", "ᚲ": "Scent", "ᛟ": "Touch", "ᛖ": "Air", "ᛥ": "Earth", "ᛞ": "Fire", "ᚻ": "Water", "ᛋ": "Mind", "ᛊ": "Body", "ᛪ": "Spirit", "ᚠ": "Creation", "ᚵ": "Destruction", "ᚡ": "Transform", "ᚴ": "Weaken", "ᚶ": "Strengthen", "ᛉ": "Life", "ᛣ": "Death", "ᛘ": "Heal", "ᛯ": "Necromancy", "ᛦ": "Harm", "ᚩ": "Quicken", "ᚫ": "Slow", "ᛐ": "Light", "ᛑ": "Darkness", "ᛚ": "Sound", "ᛛ": "Silence", "ᚽ": "Illusion", "᛭": "Join", "᛬": "Separate", "ᛌ": "Move", "ᛍ": "Gate", "᛫": "Anchor", "ᚷ": "The Known/Knowledge", "ᚸ": "The Unknown", "ᛤ": "The Unknowable/The Void", "ᛩ": "Plant", "ᚹ": "Animal", "ᚱ": "Person", "ᛇ": "Food", "ᛢ": "Poison", "ᛎ": "End", "ᛨ": "Infinity/Eternity", "ᛏ": "Begin", "ᛄ": "Fate", "ᚼ": "Luck", "ᚢ": "Large", "ᚤ": "Small", "ᚥ": "Grow", "ᚣ": "Shrink", "ᚦ": "Sun", "ᚧ": "Stars", "ᛰ": "Moon", "ᛗ": "Heat", "ᚺ": "Cold", "ᛀ": "Control", "ᚾ": "Freedom", "ᛠ": "Communication", "ᛔ": "Magic" };
- var txt = document.querySelector(".self").innerHTML;
- var res = txt.replace(/\S*(ᛜ|ᛝ|ᛃ|ᚲ|ᛟ|ᛖ|ᛥ|ᛞ|ᚻ|ᛋ|ᛊ|ᛪ|ᚠ|ᚵ|ᚡ|ᚴ|ᚶ|ᛉ|ᛣ|ᛘ|ᛯ|ᛦ|ᚩ|ᚫ|ᛐ|ᛑ|ᛚ|ᛛ|ᚽ|᛭|᛬|ᛌ|ᛍ|᛫|ᚷ|ᚸ|ᛤ|ᛩ|ᚹ|ᚱ|ᛇ|ᛢ|ᛎ|ᛨ|ᛏ|ᛄ|ᚼ|ᚢ|ᚤ|ᚥ|ᚣ|ᚦ|ᚧ|ᛰ|ᛗ|ᚺ|ᛀ|ᚾ|ᛠ|ᛔ)+\S*/g, function (glyphs) {
- var result = [];
- glyphs.replace(/./g, function (s, key) {
- if (obj[s] !== undefined) {
- result.push(obj[s]);
- }
- return obj[s] || s;
- });
- return glyphs + ((result.length === 0) ? ("") : (" (" + result.join(", ") + ")"));
- });
- document.querySelector(".self").innerHTML = res;
- })();
Add Comment
Please, Sign In to add comment