fluks / redirect-link

A browser addon to redirect a link to somewhere else.
GNU General Public License v3.0
22 stars 2 forks source link

Enable the redirection based on the link's URL #2

Closed fluks closed 5 years ago

fluks commented 7 years ago

Some redirections should be enabled only when the link's URL is a specific URL. E.g. HookTube redirection should be enabled only when the link is a YouTube link.

Add a new input in the options where the user can add a regexp filter.

This can be implemented by a content script now, that listens for contextmenu events and notifies the background script, that disables the redirections that have a link filter that doesn't match the link. Firefox is about to implement an onBeforeShow event in 57. It would be a more elegant way to implement this, but I don't will Chrome implement it too.

fluks commented 5 years ago

Commit 75fa1759b705b6edafe12f5af96cf1e78515aa7c implements this.