control-panel-for-twitter
control-panel-for-twitter copied to clipboard
[Userscript] Add menu for configs and auto update
At the moment when users update the userscript, the config options get wiped back to the default which might be intentional, if not, it might be worth putting in something like GM.registerMenuCommand
and to save the options to local storage. Additionally, it would be great if the script was set up with an @updateURL
/ @downloadURL
so that it can automatically update for userscript users. I've tried doing it on my own downloaded version of the script but it always gets wiped as it's not in the upstream version.
It's usually only the fact that you've edited a script to change its settings which prevents auto-updating from working in user script managers - I have to manually hit "Update now" in Greasemonkey for this reason - as far as I know @updateURL
and @downloadURL
haven't been needed for a while now.
Unfortunately there still doesn't seem to be any consensus on adding options pages for extensions - I'd like to do something like monkeypatching the chrome
storage APIs and using a menu item to pop up an options page whose changes get put into local storage so you never have to edit the script directly, but I haven't had the time.
@insin Just making sure; should I be seeing a Settings menu with ViolentMonkey with the userscript? I currently don't on latest Brave, and I wanted to make sure.
@MattDemers no, user scripts don't have any standard way to display options pages the way web extensions do. Implementing one would be a big effort, which I don't have time for along with maintaining the script and extension.
@insin No problem, just wanted to make sure I was doing it right/not breaking anything.
I was also going to ask how to access the settings panel with the userscript, plus a bunch of people on GreasyFork asked it too. I'll subscribe to this issue so I can stay informed when it appears!