AdguardTeam / CoreLibs

Core Adguard libraries
https://adguard.com/
Apache License 2.0
39 stars 7 forks source link

Support `GM_registerMenuCommand` and `GM_unregisterMenuCommand` #1698

Open piquark6046 opened 1 year ago

piquark6046 commented 1 year ago

Description

Currently, AdGuard does not support GM_registerMenuCommand and GM_unregisterMenuCommand that is required when an userscript developer wants to add its configuration feature, etc.

Suggestion

Reference

ngorskikh commented 1 year ago

I don't think we should give userscript developers an ability to execute code inside our applications. The applications don't even have a javascript engine to run it, anyway. @ameshkov discuss? AFAIK userscripts that want to have persistent configuration usually implement some sort of a menu on the page that they are injected into, and store/load the values with GM_setValue/GM_getValue.

ameshkov commented 1 year ago

Agreed. but I think we can implement this entirely in the page context without involving CoreLibs.

bropines commented 2 months ago

As far as I understand, it’s still hanging in todo?