Visitar URL original
[Feature] Only for {website} Option · Issue #2410 · violentmonkey/violentmonkey · GitHub
Skip to content

[Feature] Only for {website} Option #2410

Open

Description

@Rilivaine

Motivation

Currently, Violentmonkey scripts are enabled or disabled globally. If a script matches multiple websites via @match, disabling it affects all those websites at once. This makes it inconvenient to reuse a single script across multiple domains while selectively disabling it on specific sites.
Dark Reader, for example, solves this by allowing per-website enable/disable behavior, which greatly improves usability and flexibility.

Proposed Solution

Add an "Only for <website>" / per-website enable/disable option for user scripts.

When a script matches multiple websites:

  • The user should be able to enable or disable that script per domain.

  • Script settings should be stored separately for each website.

  • The UI could allow toggling a script as:

    • Enabled globally
    • Disabled globally
    • Enabled/disabled for the current website only (similar to Dark Reader’s site-specific controls)

This would not change how @match works, but would add an additional layer of per-site control on top of it.

Use Cases

  • Temporarily disabling a script on a single website for debugging without affecting other matching websites.
  • Improving user experience for users with many scripts that intentionally target broad URL patterns.

Activity

  1. tophf commented on Jan 3, 2026

    @tophf
    Member

    I think this can be already done by excluding the site via the ... menu in the popup, then removing the exclusion in the editor -> Settings tab. The only improvement upon the current behavior that might be worth implementing is showing such user-excluded scripts in an additional collapsed group in the popup.

  2. Rilivaine commented on Jan 6, 2026

    @Rilivaine
    Author

    I think this can be already done by excluding the site via the ... menu in the popup, then removing the exclusion in the editor -> Settings tab. The only improvement upon the current behavior that might be worth implementing is showing such user-excluded scripts in an additional collapsed group in the popup.

    right, so i tried that out and that's not i meant in mind.
    my idea is to add some switch that will put website into exclusive mode. changes only behavior how scripts are disabled.
    right now when you toggle script, it toggles globally.
    my idea is, if website is in exclusive mode, then toggling the script toggles it only for that specific domain we're on during toggling.

  3. tophf commented on Jan 6, 2026

    @tophf
    Member

    I don't understand what "put website into exclusive mode" means. It sounds like you've tried something else because what I suggested effectively disables the script for the given site, which in my understanding achieves your goal.

    Image
  4. Rilivaine commented on Jan 7, 2026

    @Rilivaine
    Author

    it does achieve my goal, but not in a way that feels more comfortable to me.
    exclude remove the script from the list, but if i want to bring back the script(s) back i have to go through each and every script and remove domain from its excludes.

    "put website into exclusive mode" is just a weird wording.
    i'm not entirely sure how i could explain that, so that anyone understands V_V'

    scripts right now work in global mode.
    let's imagine that we have one script for YT, PH and Twitch. it's one script that works on these 3 websites.

    right now if i disable a script it's disabled on all 3.
    exclusive mode would introduce scope where scripts' states are exclusive to that specific website.

    i would LOVE to code this myself, rather than explain it. but i don't know vue... yet?
    i might look into that anyway.
    of course if you wouldn't mind this being implemented~

  5. tophf commented on Jan 7, 2026

    @tophf
    Member

    Yeah, I understood the idea right from the start, just wanted to make sure I didn't imagine it.

    but not in a way that feels more comfortable to me

    If we show such scripts in a dedicated group in the popup, it'd be easier to toggle them back. Another improvement would be to add Exclude site to the menu so you only need two clicks in total.

  6. Baerbeisser commented on Jan 9, 2026

    @Baerbeisser

    I think i've run into the same with the pagetual script. On some sites convenient, on most sites annoying.

    An easy way to implement this UI-wise would be, if you disable the script in the popup UI and then instead of "exclude site" it should be "allow site". I think this is the same like what OP means?

    edit: oh, @tophf had the same idea before. Nevermind.

  7. tophf commented on Jan 9, 2026

    @tophf
    Member

    Sure, scripts in this dedicated group would have "exclude" flipped to "allow".

  8. BHare1985 commented on Feb 17, 2026

    @BHare1985

    I also came across this, initially I thought the toggle for the script would just disable the script for the current website, not globally.

    The ellipses for the script was not apparent for me (see below), but after I read this thread I realized there was an exclude. I agree that this needs a UX improvement.

    Image
  9. tophf commented on Feb 17, 2026

    @tophf
    Member

    The standard industry behavior for entries that apply globally is to toggle globally as well, which is what Violentmonkey does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions