Allow notifications to open extension page
In eyeo/adblockplus/abpui/adblockplusui#378 (closed), one of the requirements is that clicking a specific notification should open a landing page that we're bundling with the extension. Currently, however, notifications can only link to documentation links.
What to change
Change the behaviour of notification button links so that:
- If the link contains at least one "/" character, treat it as a URL and open it in a new tab.
- Otherwise, pass the link to
getDocLinkbefore opening the result in a new tab.
Take care to make this behaviour consistent with the "Open all links" button as well.
- Older versions of Adblock Plus will still pass all button links to
getDocLink, which will result in a link like "https://google.com" ending up as "https://adblockplus.org/redirect?link=http://google.com&lang=en". We might consider doing something for those cases server side in the redirect handler.