From b67d0c6cd64dd4f6f461c84f287a47524ff5dab9 Mon Sep 17 00:00:00 2001 From: cynic Date: Mon, 28 Feb 2022 13:22:44 -0500 Subject: [PATCH] Create tolerance.user.js --- tolerance.user.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tolerance.user.js diff --git a/tolerance.user.js b/tolerance.user.js new file mode 100644 index 0000000..38f5403 --- /dev/null +++ b/tolerance.user.js @@ -0,0 +1,20 @@ +// ==UserScript== +// @name tolerance auto-decoder +// @namespace anon +// @match *://withtolerance.horse/friendshipthroughtheages/* +// @grant none +// @version 1.0 +// @author anon +// @description 2/28/2022, 12:20:27 PM +// ==/UserScript== +function hex2ascii8(hex_) +{ + let hex = hex_.toString(); + let str = ""; + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + return str; +} +console.log("decoding hex"); +const answers = Array.from(document.querySelectorAll(".ama-answer-content, .ama-author-name")); +answers.forEach(ans => ans.innerText = hex2ascii8(ans.innerText));