violentmonkey.github.io icon indicating copy to clipboard operation
violentmonkey.github.io copied to clipboard

[BUG] Exclusionary rules to the Injection blacklist settings are ignored

Open xEBFE opened this issue 4 months ago • 3 comments

Sequence of actions:

  1. Set the following Injection blacklists under the Blacklist settings:
file://*/*
@exclude-match file://*/*.webm
  1. Install the following userscript:
https://github.com/WhatIsThisImNotGoodWithComputers/webm-looper-userscript/raw/master/webm-looper.user.js
  1. Open a local WebM file in the browser (e.g., file:///home/user/Downloads/sample.webm).

Problem:

Our userscript fails to execute indicating that our exclusionary rule was ignored. When clicking the greyed out Violentmonkey extension icon on the page that our WebM is playing in, the following message is displayed:

Blacklisted in Violentmonkey's settings
file://*/*

I tried these other following exclusionary rules which produced the same result:

@exclude file://*/*.webm
@exclude-match *://*/*.webm
@exclude *://*/*.webm

Expected result:

Our userscript should execute due to the inclusion of the @exclude-match rule.

Devtools console contents:

Environment:

  • OS: Debian GNU/Linux 12 (bookworm) x86_64
  • Browser: Mozilla Firefox 142.0 (64-bit)
  • Violentmonkey Version: 2.31.0

xEBFE avatar Sep 01 '25 16:09 xEBFE

Your case sounds like Whitelist patterns:

@match file://*/*.webm
file://*/*

The enabled sites must be listed first because the processing is sequential in the specified order until a matching pattern is encountered. I guess the documentation might need some clarification...

tophf avatar Sep 01 '25 17:09 tophf

Thank you, this is exactly what I was trying to accomplish. It seems to make more sense to me to be allowed to do the following:

file://*/*
@exclude-match file://*/*.webm

But your whitelisting solution works.

xEBFE avatar Sep 01 '25 17:09 xEBFE

No, VM's implementation of blacklist assumes that all rules without @ prefix are @exclude-match so you don't need to specify it explicitly. Still, the documentation needs this to be clarified as well as the importance of the order.

tophf avatar Sep 01 '25 18:09 tophf