Reddit Base64 Decoder

Userscript that automatically detects and decodes Base64 strings on Reddit, replacing them with readable content.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Δημιουργός
rpmn0ise
Ημερήσιες εγκαταστάσεις
2
Σύνολο εγκαταστάσεων
4
Βαθμολογίες
0 0 0
Έκδοση
1.0
Δημιουργήθηκε την
18/04/2026
Ενημερώθηκε την
18/04/2026
Μέγεθος
3 KB
Άδεια
MIT
Εφαρμόζεται σε

Reddit Base64 Decoder

Userscript that automatically detects and decodes Base64 strings on Reddit, replacing them with readable content.


Features

  • Automatic detection of Base64 strings in posts and comments
  • Real-time decoding
  • Direct replacement of encoded text
  • Converts decoded URLs into clickable links
  • Handles dynamic content via MutationObserver

Example

Before:

aHR0cHM6Ly9tb2RzZmlyZS5jb20vOXRlOFc3NTRMdWs3Q0JU

After:

https://modsfire.com/9te8W754Luk7CBT

→ Automatically clickable


Installation

Just click the "Install this script" button.


How it works

  • Scans the DOM using TreeWalker
  • Detects Base64 strings via regex
  • Decodes using atob()
  • Replaces text with:

    • <a> element if it’s a URL
    • plain text otherwise
  • Observes DOM changes with MutationObserver


Technical Notes

  • Base64 detection regex:

```js id="ex3" /\b[A-Za-z0-9+/]{20,}={0,2}\b/g


* URL detection:

```js id="ex4"
/^https?:\/\/[^\s]+$/
  • UTF-8 handling:

```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`