zmikez
Not too sore, are you?
- Joined
- Nov 24, 2021
- Messages
- 257
- Likes received
- 1,849
Hey guys, not sure exactly where to place this and figured general was a safe place.
I've noticed that a large number of the threads I've read that have been moved over from the previous forums are having formatting issues. Obviously, this isn't going to be fixed quickly since there are so many threads that are having issues and for some it's literally dozens of posts.
This fix requires a javascript addon, I personally use opera gx's "scripter" extension and firefox's javascript extension (by chee), pretty sure there's a similar addon for each browser so this should be usable by most everyone with no editing needed. All you really need to do is install an addon that executes javascript automatically on page load, like the two previously mention, then copy and paste the code below into it.
If anyone knows a better way to do this, please chime in, I'm a back-end dev so I only mess with js in an as needed basis. I haven't been able to figure out how to get rid of the italics issue without also removing the rest of the italics formatting so that's still up in the air.
Hopefully this helps someone out.
javascript to fix the encoding and font size
Example on firefox, apparently the image linking isn't working so imgur it is
I've noticed that a large number of the threads I've read that have been moved over from the previous forums are having formatting issues. Obviously, this isn't going to be fixed quickly since there are so many threads that are having issues and for some it's literally dozens of posts.
This fix requires a javascript addon, I personally use opera gx's "scripter" extension and firefox's javascript extension (by chee), pretty sure there's a similar addon for each browser so this should be usable by most everyone with no editing needed. All you really need to do is install an addon that executes javascript automatically on page load, like the two previously mention, then copy and paste the code below into it.
If anyone knows a better way to do this, please chime in, I'm a back-end dev so I only mess with js in an as needed basis. I haven't been able to figure out how to get rid of the italics issue without also removing the rest of the italics formatting so that's still up in the air.
Hopefully this helps someone out.
javascript to fix the encoding and font size
//This will load the pages content into the pageContent variable
var pageContent = document.body.innerHTML;
//This should fix any encoding issues with the % characters, as well as fixing some of the size issues I've noticed cropping up.
var updatedPageContent = pageContent
.replace(/%20/g, " ")
.replace(/%21/g, "!")
.replace(/%22/g, '"')
.replace(/%23/g, "#")
.replace(/%24/g, "$")
.replace(/%25/g, "%")
.replace(/%26/g, "&")
.replace(/%27/g, "'")
.replace(/%28/g, "(")
.replace(/%29/g, ")")
.replace(/%2A/g, "*")
.replace(/%2B/g, "+")
.replace(/%2C/g, ",")
.replace(/%2D/g, "-")
.replace(/%2E/g, ".")
.replace(/%2F/g, "/")
.replace(/%3A/g, ":")
.replace(/%3B/g, ";")
.replace(/%3C/g, "<")
.replace(/%3D/g, "=")
.replace(/%3E/g, ">")
.replace(/%3F/g, "?")
.replace(/%40/g, "@")
.replace(/%5B/g, "[")
.replace(/%5C/g, "\\")
.replace(/%5D/g, "]")
.replace(/%5E/g, "^")
.replace(/%5F/g, "_")
.replace(/%60/g, "`")
.replace(/%7B/g, "{")
.replace(/%7C/g, "|")
.replace(/%7D/g, "}")
.replace(/%7E/g, "~")
.replace(/font-size:\s*[\d.]+rem/g, "font-size: 1rem");
// This will update the page automatically
document.body.innerHTML = updatedPageContent;
var pageContent = document.body.innerHTML;
//This should fix any encoding issues with the % characters, as well as fixing some of the size issues I've noticed cropping up.
var updatedPageContent = pageContent
.replace(/%20/g, " ")
.replace(/%21/g, "!")
.replace(/%22/g, '"')
.replace(/%23/g, "#")
.replace(/%24/g, "$")
.replace(/%25/g, "%")
.replace(/%26/g, "&")
.replace(/%27/g, "'")
.replace(/%28/g, "(")
.replace(/%29/g, ")")
.replace(/%2A/g, "*")
.replace(/%2B/g, "+")
.replace(/%2C/g, ",")
.replace(/%2D/g, "-")
.replace(/%2E/g, ".")
.replace(/%2F/g, "/")
.replace(/%3A/g, ":")
.replace(/%3B/g, ";")
.replace(/%3C/g, "<")
.replace(/%3D/g, "=")
.replace(/%3E/g, ">")
.replace(/%3F/g, "?")
.replace(/%40/g, "@")
.replace(/%5B/g, "[")
.replace(/%5C/g, "\\")
.replace(/%5D/g, "]")
.replace(/%5E/g, "^")
.replace(/%5F/g, "_")
.replace(/%60/g, "`")
.replace(/%7B/g, "{")
.replace(/%7C/g, "|")
.replace(/%7D/g, "}")
.replace(/%7E/g, "~")
.replace(/font-size:\s*[\d.]+rem/g, "font-size: 1rem");
// This will update the page automatically
document.body.innerHTML = updatedPageContent;
Example on firefox, apparently the image linking isn't working so imgur it is
Last edited: