Skip to content

Option to apply rules only to active tab #32

Description

@lucienperouze-datadome

Problem

I have a set of generic rules that may be applied on any website to test my third party pluggin.
E.g : Set the user agent as WRONG_USER_AGENT, Add this header, override this one, ...

I often need to go to some new website and activate one or two rules to debug.
Instead of having to create a new rule each time, or to modify the existing one. It's more convenient for me to have a generic rule "Wrong user agent" and toggle it whenever I want.

The problem is that when such a rule is activated, it mess with all other tabs. When I'm debugging and need to go back and forth on some other websites. I'm constently activating / de-activating the rule.

Solution

The perfect solution for this use case would be to add an option to activate rules only for the active tab.
This could be a toggle in the settings : "Tab only activation" - "Only activate rules for the current tab".

The extension would store the current tab when activating rules and toggle them on and off on tab changes.

To me, this should even be the default behaviour as I don't know why you would want to activate a rule on all your browser. It's always to debug a particular tab.

Activity

  1. linear commented on Dec 4, 2025

    @linear
  2. self-assigned this
    on Dec 5, 2025
  3. sachinjain024 commented on Dec 5, 2025

    @sachinjain024
    Contributor

    Hey @lucienperouze-datadome Thanks for creating the ticket and providing a potential solution.

    We use Chrome DeclarativeNetRequest API to configure the request modifications like header modifications and URL redirects.

    Technically, this is possible to apply tabIds filter while creating the rule matching condition

    {
      "id": 1,
      "priority": 1,
      "condition": {
        "tabIds": [101], // This rule only applies to tab with ID 101
        "urlFilter": "||example.com^",
        "resourceTypes": ["script"]
      },
      "action": {
        "type": "block"
      }
    }
    

    We don't do this because this is not a very common use case. I'd like to suggest a workaround, can you try using Advanced Filters option available in Headers Rule

    Image

    You can specify a page domain filter instead so when you activate this rule, you only need to set the page domain and rest of the websites won't be affected when you are testing/debugging.

    Would it help your cause?

  4. lucienperouze-datadome commented on Dec 8, 2025

    @lucienperouze-datadome
    Author

    Hello, Thanks for the answer !

    Ok, maybe I'll use that. But in my case, that's tedious to go to the app and change the rule manually each time I need it.
    That's a shame it's not a more common use case. To me that could help every third party developpers. It make more sense in our case to have a list of generic filters and to contextually apply them.

    Maybe it would be more usefull for other this way :

    • Add an "Excluded Page Domains" to source filters.
    • Allow lists on your source filters
    • Add a shortcut way on the popup to manage Page Domain source filters. There could be "⋮" button next to the toggle, oppening a contextual menu with : "Include / Exclude this page domain" (as an add blocker). You could add other rule options in that contextual menu.
    • Optionnal: Add a visual feedback to see if rule is filtered out by source filter (Toggle is on but its opacity is low). This would be different on each tab.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions