was thinking this would best be a browser extension instead of a greasemonkey script. seems fairly trivial from that perspective. what do you think of collaborating on that?
Was thinking that the best user experience would be a banner message saying "Open this {lemmy|kbin} {post|community|magazine} in your home instance?" which can be dismissed or accepted.
Userscripts are more portable than extensions. There's also basically no reason for this to be an extension, what features does being an extension provide which this would benefit from?
You made me second guess myself, and I'm not entirely sure what to believe.
The GM.setValue documentation says
... persist simple values across page loads and across origins.
But 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 from lemmy_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
Userscripts are more portable than extensions. There's also basically no reason for this to be an extension, what features does being an extension provide which this would benefit from?