CleanURLs (Clean URL Improved)

Remove tracking parameters and redirect to original URL. This Userscript uses the URL Interface instead of RegEx.

< Feedback on CleanURLs (Clean URL Improved)

Review: Good - script works

§
Posted: 14.5.2024

I'm also not a developer, is there a way to re-run the script after the page has loaded and there is more data fetched?

Here is a sample of what I mean, there is a long list of YouTube URLs with the ?si parameter that are cleaned, then you click load more comments at the very bottom, and more YouTube URLs load, but with the ?si parameter not cleaned.

Example link: https://old.reddit.com/r/AskReddit/comments/1cgwxgu/

schimonAuthor
§
Posted: 15.5.2024
Edited: 15.5.2024

Edit: I have read your comment again. I think understand better.

I'm also not a developer, is there a way to re-run the script after the page has loaded and there is more data fetched?

Perhaps I do not understand, because the script already runs after the page is loaded and I intend to implement the suggestion of Dimitri. Please elaborate more about it.

Question: Suppose you can re-run the script: What would the script do when you re-run it?

Here is a sample of what I mean [...]

Apparently, si is listed as blacklisted. I guess I should add a set of rules to selectively whitelist it, per the use case you present here.

I have updated the script due to your report.

Note: In any case, each time you encounter a link with blacklisted items, a black rectangle should appear with a red circle which is the original link.

§
Posted: 15.5.2024
Edited: 15.5.2024

Sorry I wasn't clear. When I commented, your script was working great, it was removing the ?si= parameter from YouTube links on Reddit and other pages as expected.

However, when the Reddit page is updated and it fetches more Reddit comments (without reloading the page), those new fetched Reddit comments have YouTube links that are not having the parameter removed. I gave the example in the first post I sent where you press more comments at the bottom. The new comments loaded all have ?si= on the links in comments.

schimonAuthor
§
Posted: 15.5.2024
Edited: 15.5.2024

Good.

I was wondering about handling this scenario, though I had no opportunity to examine it, as JS is usually disabled on my HTML browser.

I should add "event listener" to handle such situation.

Thank you for your feedback.

Post reply

Sign in to post a reply.