For example, I want to create a GM script, and the function I want to achieve is: after clicking the button I add on a web page such as "http://example.com", my script will automatically generate a statement //@exclude http://example.com and adds this line to its metadata instead of manually adding it.
GM scripts run in page/content context (GM|TM|VM), or userScripts context (FireMonkey).
They have no access to the extensions which runs in the browser context, nor should they have as it would be a major security risk.
Userscript manager extension developers can implement such features. Currently ...
@match for the current active tab@match for the current active tab