Userscript that automatically detects and decodes Base64 strings on Reddit, replacing them with readable content.
Userscript that automatically detects and decodes Base64 strings on Reddit, replacing them with readable content.
MutationObserverBefore:
aHR0cHM6Ly9tb2RzZmlyZS5jb20vOXRlOFc3NTRMdWs3Q0JU
After:
https://modsfire.com/9te8W754Luk7CBT
→ Automatically clickable
Just click the "Install this script" button.
TreeWalkeratob()Replaces text with:
<a> element if it’s a URLObserves DOM changes with MutationObserver
```js id="ex3" /\b[A-Za-z0-9+/]{20,}={0,2}\b/g
* URL detection:
```js id="ex4"
/^https?:\/\/[^\s]+$/
```js id="ex5" decodeURIComponent(escape(atob(str)))
---
## Limitations
* Possible false positives (strings matching Base64 pattern)
* Decoded output may be unreadable (binary data)
* Depends on Reddit’s DOM structure
* May reprocess dynamically loaded nodes
---
## Improvements (TODO)
* Better false-positive filtering
* Optional UI (tooltip / toggle)
* Multi-site support
* Performance optimization (avoid redundant scans)
* Replace legacy UTF-8 handling with `TextDecoder`