Basic implementation for contextMenu and browserAction