From 6315526d420886bf550fc4ac3bf2d68a6cb8d206 Mon Sep 17 00:00:00 2001 From: cynic Date: Mon, 28 Feb 2022 13:34:06 -0500 Subject: [PATCH] replace plain spaces --- tolerance.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tolerance.user.js b/tolerance.user.js index 38f5403..9321a80 100644 --- a/tolerance.user.js +++ b/tolerance.user.js @@ -15,6 +15,11 @@ function hex2ascii8(hex_) 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)); + +answers.forEach(function(ans) { + ans.innerText = ans.innerText.replaceAll(" ", ""); + ans.innerText = hex2ascii8(ans.innerText); +});