this post was submitted on 23 Jun 2023
49 points (100.0% liked)
Lemmy Plugins and Userscripts
2148 readers
1 users here now
A general repository for user scripts and plugins used to enhance the Lemmy browsing experience.
Post (or cross-post) your favorite Lemmy enhancements here!
General posting suggestions:
- Preface the submission with the type of enhancement - ex: [UserScript].
- Include a screenshot of the enhancement in use (where possible)
- Indicate the requirements for use (eg, greasemonkey, stylus, etc.)
Thanks!
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't believe this would be possible without relying on a userscript or a centralised site.
Assuming you are logged in to the website, couldn't the website just check to see where you're logged in to? Seems like a cookie might be able to do that (if the user gave permission)?
The functionality in this script is indeed only possible as an addon or userscript. Browsers specifically spent a lot of work trying to make it impossible for one site to get any information about which other sites the user visited, and for good reason. Just imagine the phishing this would allow if it were possible.
That said, there could of course be an official lemmy browser addon/userscript for this functionality. But it definitely wouldn't be baked into the sites themselves.
Because idk if you noticed, but this script actually rewrites all links everywhere, so for example even if you get a result to some lemmy instance on duckduckgo, the link on duckduckgo itself will already point to your instance. Please tell me how that would be possible without an addon/userscipt :D
Cookies can only be read by the same domain (or subdomain). So a cookie set by lemmy.ml couldn't be read by lemmy.world, as their domains are different. This is called the "same-origin policy", and applies to all forms of local storage in browsers.