forked from sch/schapps
1efc50a747
Fix syntax of previous posts.
59 lines
1.8 KiB
ReStructuredText
59 lines
1.8 KiB
ReStructuredText
.. title: Clean URLs
|
|
.. slug: cleanurls
|
|
.. date: 2024-09-24 00:00:00 UTC
|
|
.. tags: ecma, html, greasemonkey, link, privacy, tracker, url
|
|
.. link: cleanurls
|
|
.. description: Original URL redirector and fixer
|
|
.. type: text
|
|
|
|
Remove needless parameters from a given URL and correct it to a cleaner one.
|
|
|
|
About
|
|
-----
|
|
|
|
This script was started as a proof of concept of utilizing the URL API instead of RegEx.
|
|
|
|
To add a new hash or parameter, simply add it to the respective array.
|
|
|
|
Enjoy graceful sharing!
|
|
|
|
Legend and visual examples
|
|
--------------------------
|
|
|
|
* Discovered URL (l)
|
|
|
|
URL found within a parameter
|
|
|
|
* Pure link (w)
|
|
|
|
URL without parameters (mere pathname)
|
|
|
|
* Safe link (g)
|
|
|
|
URL with whitelisted parameters
|
|
|
|
* Semi-safe link (y)
|
|
|
|
URL purged by blacklist
|
|
|
|
* Unsafe link (r)
|
|
|
|
Original URL (useful in rare cases)
|
|
|
|
.. code::
|
|
|
|
orderBy orderDir src ref version source url Custom Visual Example
|
|
Link №1 ✓ ✓ ✓ ✓ ✕ ✕ ✕ ✕ (l)(w)(g)(r)
|
|
Link №2 ✓ ✓ ✕ ✕ ✓ ✕ ✕ ✕ None
|
|
Link №3 ✓ ✓ ✕ ✓ ✓ ✕ ✕ ✕ (w)(g)(r)
|
|
Link №4 ✓ ✓ ✕ ✓ ✓ ✓ ✓ /ref= (l)(l)(w)(g)(y)(r)
|
|
Link №5 ✓ ✓ ✓ ✕ ✓ ✕ ✕ 465933 (l)(w)(g)(y)(r)
|
|
Link №6 ✓ ✓ ✕ ✕ ✓ ✕ ✓ ✕ (l)(w)(g)(y)
|
|
Link №7 ✕ ✕ ✕ ✓ ✕ ✕ ✕ slackware (l)(w)(r)
|
|
Link №8 ✕ ✕ ✕ ✕ ✕ ✓ ✕ (l)(w)(y)
|
|
|
|
Resources
|
|
---------
|
|
|
|
* https://greasyfork.org/scripts/465933-cleanurls-clean-url-improved
|
|
* https://openuserjs.org/scripts/sjehuda/Clean_URL_Improved
|