pURLfy for Tampermonkey

The ultimate URL purifier - for Tampermonkey

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

Autor
PRO-2684
Dnevne instalacije
0
Ukupnih instalacija
1.792
Ocjene
16 2 0
Verzija
0.6.1
Stvoreno
14.04.2024.
Ažurirano
29.08.2026.
Size
23,9 KB
Licenza
GPL-3.0
Primjenjuje se
Sve stranice

pURLfy for Tampermonkey

Greasy Fork Support on Afdian

Navigate to GitHub repo for updated info.

The ultimate URL purifier - Tampermonkey version. This script uses pURLfy core as its core, and integrates its URL purifying functionality into a Tampermonkey script.

Installation

Simply navigate to Greasy Fork and click the "Install this script" button.

Configuration

  • 📖 Rules Settings: Enable or disable rules
    • Tracking: Rules for purifying tracking links
    • Outgoing: Rules for purifying outgoing links
    • Shortener: Rules for restoring shortened links
    • Alternative: Redirects you from some websites to their better alternatives
    • Other: Rules for purifying other types of links
    • Remove Text Fragment: Remove Text Fragments from URL
  • 🪝 Hooks Settings: Enable or disable hooks
    • location.href: Check location.href
    • click: Intercept click events
    • mousedown: Intercept mousedown events
    • auxclick: Intercept auxclick events
    • touchstart: Intercept touchstart events
    • window.open: Hook window.open calls
    • pushState: Hook history.pushState calls
    • replaceState: Hook history.replaceState calls
    • Bing: Site-specific hook for Bing, seems to be unnecessary for now
  • 📊 Statistics: Show statistics
    • URL: Number of links purified
    • Parameter: Number of parameters removed
    • Decoded: Number of URLs decoded (param mode)
    • Redirected: Number of URLs redirected (redirect mode)
    • Visited: Number of URLs visited (visit mode)
    • Character: Number of characters deleted
  • ⚙️ Advanced options: Advanced options
    • Purify URL: Manually purify a URL
    • Senseless Mode: Enable senseless mode
    • Disable Beacon: Overwrite navigator.sendBeacon to a no-op function
      • Try out this feature on Ping Spotter - the "Beacon API" section will show "Request blocked"
    • Debug Mode: Enable debug mode

Senseless Mode

By default, "Senseless Mode" is enabled, and the script will adopt a lenient approach to URL purification, prioritizing user experience over strict URL cleansing. This may help reduce interruptions and maintain website functionality while still providing a level of URL purification.

You can disable it in the advanced options. By doing so, you're switching to "Strict Mode", where this script will take radical measures to ensure that URLs are purified before they are used. However, in some cases, this may lead to noticeable interruptions or even break certain functionalities on some websites.

Here's a table comparing the two modes:

Feature Strict Mode Senseless Mode
URL Purification Priority High Medium
Privacy Protection Level Strict Moderate
Potential Interruptions Possible Less Likely
Target Audience Advanced Users General Users

Technical details:

  • In strict mode, this script will stop mouse events and re-dispatch them after the url is cleaned to ensure the cleaned URL is used. In senseless mode, the script will not stop the event, which may lead to the original URL being used in some cases.
  • In strict mode, this script will immediately change location.href when it detects an uncleaned URL, causing a page reload or even leading to infinite reloads in some cases. In senseless mode, the script will just call history.replaceState to change the URL without reloading the page.

Updating rules

Configuring the update interval for rules

Navigate to Tampermonkey Dashboard - Settings - External, and choose the update interval you want from the dropdown menu.

Updating rules manually

Navigate to Tampermonkey Dashboard - Installed Userscripts - pURLfy for Tampermonkey - External, and for each entry under Resources, click the Update or Delete button. After refreshing the page, the rules will be updated automatically.

How it works

Purifying URLs

See pURLfy core and its source code for more information.

Rules

Rules files can be fount at pURLfy rules.

Hooks

This script hooks certain methods, intercepts calls to them, purifies the URLs, and then calls the original methods with the purified URLs. For more information, see the source code.

Related scripts

去除链接重定向