hankxdev / one-click-extensions-manager

a simple chrome extension to manage chrome extension
MIT License
168 stars 31 forks source link

Update list on global events #134

Closed fregante closed 1 month ago

fregante commented 1 month ago

https://developer.chrome.com/docs/extensions/reference/api/management#event

"installed" is easy to add. Enabled/disabled events mean also removing the state changes from the svelte app, i.e. this line: https://github.com/hankxdev/one-click-extensions-manager/blob/14ee1e5ddc946b82c504f1c5e7e7f8ab8d6f0663/source/app.svelte#L75

hankxdev commented 1 month ago

i'm a little bit confused, doesn't the extension list refresh whenever the user opens the manager popup? so when a user installs/uninstalls/enables/disables an extension from outside the manager, the list should be refreshed when they open the manager.

unless they keep the manager open, and do these actions in another window. which is a very rare scenario.

fregante commented 1 month ago

It doesn't because those listeners are missing. We only have onUninstalled.

You can verify by opening our manager in a tab or popup, then install a new one. Or toggle one via the native manager

hankxdev commented 1 month ago

yeah, I mean, it happens only if you keep the manager open and then do these actions.

I personally never open the manager in a tab or popup window. but you are right, if someone is doing so, we can add these listeners.