this post was submitted on 24 Jun 2023
28 points (96.7% liked)
Lemmy Plugins and Userscripts
2171 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
You made me second guess myself, and I'm not entirely sure what to believe.
The
GM.setValue
documentation saysBut using your script I don't see that's the case. I go to a lemmy instance, open options, set my home, and then go to a new instance, and the home is not saved. I was under the impression that the best way to solve this was an extension which can access sandboxed files (which you could write to instead of the localstorage). Or we could deploy a rest api that can hold that info, I guess that doesn't need to be an extension though.
I'm not entirely sure now. Let me know if I'm way off base.
PS. Also you replied twice.
EDIT: ok so based on my research
setValue
is using a storage that is based on the script name.. so then it should work. I'm not sure why mine isn't working. But regardless, I am using another script fromlemmy_monkey
that alters the layout and seems to be conflicting with the design you've implemented... I will look at making a PR that I think will provide a better UX.But still, please explain if I am off base on this because I'm fairly new with the GM library. > h
I'm not sure what you're doing. If you "go to a lemmy instance, open options, set my home, and then go to a new instance, and the home is not saved" then I think you're doing it wrong.
If you press "Make this my home instance for URL rewriting" then the button should disappear. If you then go to another instance, also into the settings, then of course there the button "Make this my home instance for URL rewriting" will be there again, because this new instance is not your home, you just made the other one your home. Your home has been saved correctly if, at your home instance, there is NO button "Make this my home instance for URL rewriting" anymore. But at every other instance this button should be there, because all other instances are not your home.
And yes, you understood correctly how
GM.setValue
works.PS. I deleted one of the comments, but apparently that has not been federated.
Hm that was not my experience. I’ll try again tomorrow and report back