schomery / popup-blocker

A reliable popup blocker with history
https://webextension.org/listing/popup-blocker.html
Mozilla Public License 2.0
143 stars 37 forks source link

Always run action when ON certain site #156

Closed cu1tur4l closed 8 months ago

cu1tur4l commented 8 months ago

Hello, Thank you so much for creating this addon - it is very handy :) If there is an option like that, I'm so sorry, I really was searching for it and couldn't find it. I am using startpage as my search engine, and it has an option to open search results in new browser tab. You can change it, but it saves in cookies, and my browser is set to delete all cookies on exit. So it would be very nice if I could set popup-blocker to always redirect popup when the domain I am right now is startpage, if that makes sense. "Run Action when Possible" sounds like something that could do it, but I couldn't get it to work. Maybe I didn't understand FAQ about it (very possible), but either way I'm here :/

Thanks again ❤️

schomery commented 8 months ago

We had immediate action JSON, but it was based on the popup address. From the next release, you can define an action based on the page address. So in your case, you can use the following JSON on the options page:

{
  "ro:startpage\\.com\\/": "redirect"
}

This only works from version 0.8.3

Read FAQ 24 for more info.