Won't block 3rd party properly
-
@SweetP That sounds good. Maybe an "advanced" switch in the options that enforces strict subdomain separation? The default could be current behaviour, but for savvy users, the switch would allow for more granularity.
Anyways, would be happy to test a beta of what you come up with. Let me know if I can help in any way.
-
@SweetP Might be a WebKit limitation sadly
If it turns out that the feature cannot be implemented, maybe it’s a better UI to have just the base domain be added when you click the +exception even if you are on a subdomain, since this would be the expected behavior. What do you think?
-
@SweetP Ok, so from what I could tell of the way Minim is writing its ruleset, the trigger “if-domain” with the wildcard * seems to make the root domain + all subdomains whitelist appear.
As per Apple’s docs, "if-domain | An array of strings to match to a URL's domain; limits the action to a list of specific domains. The values must be lowercase ASCII, or Punycode for non-ASCII. Add * in front to match domain and subdomains. You can't use this with unless-domain.”Would this mean that having Minim just add the if-domain without the wildcard * in front work as expected (i.e. to block just that specific subdomain) ?
This way, the user could either add * in front if he/she wants to block the root domain and be done with it or have more granular control by default.
Of course, there could be a small UI element (like a checkmark/asterisk icon or something similar) in front when adding a wildcard exception to the Minim list.
Would this work/be reasonable?
-
ok so Ive worked on this a little this morning.
and I have changed the default behaviour in Minim to only block the urls listed.
subdomains will be unaffected by rules.After lunch ill take a look add adding in support for the use of the
*
wild card prefix to also block all subdomains.These changes have the added benefit of speeding up url matching, which should improve performance
-
@SweetP said in Won't block 3rd party properly:
Also, currently domains with a wildcard will override subdomain rules…
I’ll see if there’s anything I can do about thatI would think this to the expected behaviour. Once the user adds a wildcard root domain all subdomain rules should be ignored.
It would be great if the ruleset would automatically be pruned once the user whitelists the root domain with the wildcard, but that’s a nice to have mostly. -
@SweetP Something seems to be wrong. The update just hit a moment ago and Minim seems to be blocking everything by default and ignores the Block Rules tab. Regardless of the options in Block Rules tab, the only rules written are the default
{ "trigger" : { "url-filter" : ".*" }, "action" : { "type" : "ignore-previous-rules" } }, { "trigger" : { "url-filter" : ".*" }, "action" : { "type" : "block" } },
I think the resource-type trigger field is missing from the default block rules and just the action (i.e. block) is being generated, thus blocking every URL.
-
@SweetP Update just hit. Seems to work well, except for a small issue with the way www and non-www domains get handled.
If you go to www.google.com and add an exception for it, Minim’s list will have google.com without the www part
This means that with the current behaviour it won’t load resources unless the user manually fixes the exceptions list and adds the www back.I think the regex for www matching is broken because of the extra escape char \ after www:
^https?:\/\/(www\\.)?google.com[:\/]