implemented logic to open URL or browser_action