I have a JSON file which I want to re-use between content scripts, …if I can.
In most content scripts, you can use contentScriptOptions
,
but in context-menu API, can not.
Also, context-menu.Item doesn’t have port
property.
Another approach I tried is using postMessage()
, but it seems like a one way ticket from context-menu script to add-on script.
context-menu API has a data
property, it is almost close but it’s passed on click
event,
and I want to use JSON also on context
event which is fired before click
.
Any idea?