105 1.01 KB 31
-
1.
// ==UserScript==
-
2.
// @name tolerance auto-decoder
-
3.
// @namespace anon
-
4.
// @match *://withtolerance.horse/friendshipthroughtheages/*
-
5.
// @grant none
-
6.
// @version 1.1
-
7.
// @author anon
-
8.
// @description 2/28/2022, 12:20:27 PM
-
9.
// ==/UserScript==
-
10.
function hex2ascii8(hex_)
-
11.
{
-
12.
let hex = hex_.toString();
-
13.
let str = "";
-
14.
for (var i = 0; i < hex.length; i += 2)
-
15.
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
-
16.
return str;
-
17.
}
-
18.
-
19.
console.log("decoding hex");
-
20.
const answers = Array.from(document.querySelectorAll(".ama-answer-content, .ama-author-name"));
-
21.
-
22.
answers.forEach(function(ans) {
-
23.
let temp = ans.cloneNode(true);
-
24.
ans.innerText = ans.innerText.replaceAll(" ", "0A");
-
25.
ans.innerText = hex2ascii8(ans.innerText);
-
26.
Array.from(temp.children).forEach(function(sub) {
-
27.
sub.innerText = sub.innerText.replaceAll(" ", "0A");
-
28.
sub.innerText = hex2ascii8(sub.innerText);
-
29.
ans.innerHTML = ans.innerHTML.replace(sub.innerText, sub.outerHTML);
-
30.
});
-
31.
});
by Guest
by Guest
by Guest
by Guest
by Guest