dividedby / General-URL-Cleaner-Revived

Userscript to clean various URLs and remove tracking elements
https://greasyfork.org/en/scripts/432387-general-url-cleaner-revived
GNU General Public License v3.0
25 stars 8 forks source link
amazon bing ebay facebook google javascript newegg pocket target twitter userscript youtube

General URL Cleaner Revived

Cleans various URL's and/or page links on Google, Youtube, Newegg, Amazon, Ebay, Facebook, Twitter, IMDB, StaticICE, Pocket, Target

It will clean these URLs regardless of what top level domain (.com, .ca, .fr, etc) or subdomain (unless excluded, various Google sites break easily like Docs, Hangouts, Takeout, etc)

Feel free to report issues or make pull requests for fixes, enhancements, etc: https://github.com/dividedby/General-URL-Cleaner-Revived

https://greasyfork.org/en/scripts/432387-general-url-cleaner-revived

Recent fixes

[Add] Properly support all Amazon TLDs: https://github.com/dividedby/General-URL-Cleaner-Revived/issues/12 [Add] Strip "sclient" parameter from Google search results: https://github.com/dividedby/General-URL-Cleaner-Revived/issues/4
[Fix] Resolve issue with "undefined" being added to end of cleaned URLs: https://github.com/dividedby/General-URL-Cleaner-Revived/issues/5
[Fix] Updated regex of site matching to better catch sites and any top level domain (.com, .co.uk. .fr, etc): https://greasyfork.org/en/scripts/432387-general-url-cleaner-revived/discussions/143277
[Add] Add additional Bing parameters to be cleaned: https://greasyfork.org/en/scripts/432387-general-url-cleaner-revived/discussions/143277
[Add] New parameters for most supported sites, script runs at document-end to better catch any changes made to URLs that can be cleaned, updates to the core script to formatting and correct JS conventions

Google

Cleans Google search URL's
A normal google search URL might look like this: https://www.google.com/search?num=100&q=google&oq=google&gs_l=serp.3..0l10.7976.8565.0.9999.6.6.0.0.0.0.358.617.2-1j1.2.0....0...1c.1.64.serp..4.2.615.BQ3ZvdzuPGE
A cleaned google search url: https://www.google.com/search?q=google
Removes redirection of Google results links
Works with international Google sites (not just .com)

Bing

Cleans Bing search URL's
A normal google search URL might look like this: https://www.bing.com/search?q=google&qs=n&form=QBLH&pq=google&sc=9-2&sp=-1&sk=&cvid=97312C9A5750490FB6C424E46C6759EF
A cleaned bing search url: https://www.bing.com/search?q=google

Youtube

Cleaned url always looks like this: https://www.youtube.com/watch?v=[video-id]
Removes redirection of description links

Amazon

Cleaned url always looks like this: http://www.amazon.com/gp/product/[item-id]/ Or this: http://www.amazon.com/dp/[item-id]/
Works with international sites (not just .com)

Facebook

Typical Facebook link looks like this: https://www.facebook.com/photo/?fbid=3121744148088497&set=pcb.3121748278088084
Cleaned URL looks like this: https://www.facebook.com/photo/?fbid=3121744148088497

Newegg

Cleaned url always looks like this: http://www.newegg.com/Product/Product.aspx?Item=[item-id]

Ebay

Cleaned url always looks like this: http://www.ebay.com/itm/[item-id]
Works with international sites (not just .com)

Pocket

Removes redirection of Pocket links

Target

Target product URLs must be reloaded when coming from search results as they load in via code and not a page refresh
Cleaned url always looks like this: https://www.target.com/p/A-[item-id]
Removes unnecessary parameters

Other

Removes unnecessary parameters from, Twitter, StaticICE, Disqus
Removes redirection of links



This script forked from beck's script. https://greasyfork.org/en/scripts/395298-general-url-cleaner

Additional fixed

[Add] Add Target.com cleaned item urls, will look like this: https://www.target.com/p/A-[item-id]
[Fix] Google Takeout downloads, added takeout.google.com to the exclusions: https://greasyfork.org/en/scripts/395298-general-url-cleaner/discussions/95974
[Fix] Resolved issue with Google search parameter sa, without it certain search links aren't able to redirect properly: https://greasyfork.org/en/scripts/395298-general-url-cleaner/discussions/95974
[Add] Strip s parameter from Twitter post links: https://greasyfork.org/en/scripts/395298-general-url-cleaner/discussions/71892
[Fix] Opening images from normal Google search now expands the selected image: https://greasyfork.org/en/scripts/395298-general-url-cleaner/discussions/87398