firefox addon webextensions - How to limit 'contextMenus' to 'httphttpsabout:newtab'? - Stack Ov

admin2025-04-17  6

documentUrlPatterns in menus/contextMenus use match patterns.

Not setting documentUrlPatterns would make it appear in about:newtab but then the menu would also appear in other unwanted pages (e.g. moz-extension:, other about:...).

What I am after is to show the context-menu on these pages only:

['http://*/*', 'https://*/*','about:newtab', 'about:blank']
转载请注明原文地址:http://www.anycun.com/QandA/1744895823a89151.html