RIP µMatrix?

General discussion about web technology.
barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

RIP µMatrix?

Post by barbaz » Sun Sep 20, 2020 1:51 pm

*Always* check the changelogs BEFORE updating that important software!
-

User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3354
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: RIP µMatrix?

Post by GµårÐïåñ » Sun Sep 20, 2020 6:59 pm

with uBlock it is effectively moot so I can appreciate him not wanting to waste what little time and energy he's got working on something that is at best a novelty at this point, in fact if he was so inclined rolling what little specific feature remains of it into uBlock would make for a better tool and consolidate his efforts than continuing to develop in parallel
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 OPR/71.0.3770.148

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Tue Sep 22, 2020 1:31 am

GµårÐïåñ wrote:
Sun Sep 20, 2020 6:59 pm
with uBlock it is effectively moot [...] something that is at best a novelty at this point,
I don't understand this comment? How could uBlock Origin make my use of µMatrix moot? Image
GµårÐïåñ wrote:
Sun Sep 20, 2020 6:59 pm
if he was so inclined rolling what little specific feature remains of it into uBlock would make for a better tool and consolidate his efforts than continuing to develop in parallel
Didn't he already try this under the name "HTTP Switchboard" and decided against it?
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3354
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: RIP µMatrix?

Post by GµårÐïåñ » Wed Sep 23, 2020 4:22 pm

HTTP Switchboard was the first and initial attempt at it and then got renamed to uMatrix. The functionality for blocking the scripts which is the only thing uMatrix is pretty much geared for is available in uBlock, so as a general blocker that can block anything, including scripts, why wouldn't it be moot?
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 OPR/71.0.3770.148

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Thu Oct 08, 2020 12:36 am

Well I would agree about blocking scripts. But...
GµårÐïåñ wrote:
Wed Sep 23, 2020 4:22 pm
why wouldn't it be moot?
... for starters, just examining my own use of µMatrix:

1) 3rd-party frame blocking. Can be done in uBlock Origin static filtering, but there is no equally convenient interface for allowing individual sites' frames.

2) Broad spectrum per-site permissions. Probably can be done in uBlock Origin static filtering, but there is no equally convenient interface for allowing at the needed granularity.

3) Some fine-grained cookie control. Not a feature of uBlock Origin, nor any other extension I can find.

4) Applying a much more limited ruleset on sites I want to disable uBlock Origin. Might be possible in uBlock Origin alone, combining static filtering and dynamic filtering instead of disabling, but I couldn't figure out how to do it with the same granularity.
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3354
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: RIP µMatrix?

Post by GµårÐïåñ » Thu Oct 08, 2020 4:55 pm

The granularity is because that's all it does, so agreed it has that. But nothing that can't be done using the filter panel and writing up the rules ala ABE.

Basically if it can be blocked, putting aside the interface and ease of doing it by point and click, can be blocked in uBlock exactly the same way it can be done in that (give or take simply because I don't use both nor do I need do it), although granted probably has more elaborate interface for it.

But I can still see as a developer why the edge case of convenience might not be a reason to spend time maintaining two projects. He can just as easily refocus his efforts to begin including those as well down the line if he felt so inclined, like much of the other behavior has trickled out to it already, albeit not as elaborately probably.

It also comes down to, when you have limited time and resources, what do you put your effort in, something that has a wide reach and has far more impact or comparatively much smaller specialty reach? But again, I am making educated assumptions, I don't know shit for a fact and I can't speak for the man or what his decision is based on, only he can elaborate on it himself if he wishes.

Reach out to him and see if he feels up to giving some input on it, that would probably be the best.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Thu Oct 08, 2020 6:02 pm

GµårÐïåñ wrote:
Thu Oct 08, 2020 4:55 pm
I can still see as a developer why the edge case of convenience might not be a reason to spend time maintaining two projects. He can just as easily refocus his efforts to begin including those as well down the line if he felt so inclined, like much of the other behavior has trickled out to it already, albeit not as elaborately probably.

It also comes down to, when you have limited time and resources, what do you put your effort in, something that has a wide reach and has far more impact or comparatively much smaller specialty reach?
Thanks GµårÐïåñ, that clarifies. I know for a fact gorhill does think this way, although I can't speak for him about this particular decision either.

The cookie controls are an edge case even for me, so yeah.
GµårÐïåñ wrote:
Thu Oct 08, 2020 4:55 pm
The granularity is because that's all it does, so agreed it has that. But nothing that can't be done using the filter panel and writing up the rules ala ABE.
And that saves me asking my follow-up question: instead of continuing to recommend µMatrix around this forum, I'll recommend uBlock Origin in those cases. IIRC most of the time those people want some way to achieve ABE-style per-site permissions in cases where DNS details don't matter, so they are willing to write everything out anyway.
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3354
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: RIP µMatrix?

Post by GµårÐïåñ » Fri Oct 09, 2020 5:40 pm

Although this may be a wrong of thinking about it, I always saw uMatrix as a combination of NS and RP blended into a cleaner single interface with more "intuitive" and "friendlier" approach. While uBlock was meant to be a general purpose blocker, not necessarily as an adblocker, even though that's probably what it is most famous for and started life as, which effectively says: if it is a resource that can be pulled, it can be blocked. Now that is probably grossly oversimplifying it but not incorrect either.

So in that sense, I always felt that it gave me the functionality of NS, RP and AB all in a neat little package (hell recently it even feels like I have a bit of GM ability which is nice, although tightly limited to purpose). Granted, some granularity might be there or not, come now or later, but that's the natural evolution of any software, you can't make it do everything on day one. It is neither good for the health of the project nor feasible when you are limited in "resources", be it developers (you are the only one), supporting it (you might have fanboys but ultimately, your baby your responsibility), time and effort (coding it without being paid and still having to have a real job to make a living) and etc.

I know you know and get it so I won't labor on about it, Girogio is a fabulous example of someone who busts his ass for no direct gain.There is nothing that says people can't continue to use it as-is but yes, I would personally say the sooner they learn to port themselves over to uBlock and adapt to the "interface", "rules syntax" and reading the docs to understand the underlying features that may not necessarily be visually exposed but you can still reach (sort of how we used to configure some parts of NS using about:config with no interface) if you know where to look, and even the warning explains quite a bit about why and why not you should or should not continue.

Honestly, I am glad we had the discussion, because it might provide a good roadmap for people to evaluate how they should proceed with everything, may even demystify and ease transition if they know they won't suddenly be lost.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Tue Nov 24, 2020 1:43 am

I'm now trying to make the conversion to only uBlock Origin myself. I think I'm almost there, but I'm stuck on one thing.

I liked µMatrix's blocked-iframe placeholder that showed the text URL and provided a link to click to open the frame's URL in new tab. Although I can get those things with the new uBlock Origin's click2load.html placeholder, this is not as clickjacking-proof as µMatrix's placeholder document.

So I'd like to implement the µMatrix blocked-frame placeholder in uBlock Origin.

I would think it'd be possible to use custom userResourcesLocation to write the placeholder resource. But looking at the code for click2load.html, looks like I would need to specify in the resource declaration that the blocked URL should be passed as a parameter. But I'm not seeing how to specify that in a custom resource?

How to create a $redirect-rule resource for uBlock Origin to show a custom placeholder for blocked iframes that includes the blocked frame's URL?
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Wed Nov 25, 2020 7:01 pm

^ I got it through modifying uBlock Origin code, adding this as a built-in resource. But it would be much better to do it with stock uBlock Origin. How to?
*Always* check the changelogs BEFORE updating that important software!
-

gorhill
Junior Member
Posts: 47
Joined: Sun Mar 30, 2014 12:19 pm

Re: RIP µMatrix?

Post by gorhill » Thu Nov 26, 2020 3:18 pm

barbaz wrote:
Wed Nov 25, 2020 7:01 pm
^ I got it through modifying uBlock Origin code, adding this as a built-in resource. But it would be much better to do it with stock uBlock Origin. How to?
This cannot be done without the replacement document being a web accessible resource. The replacement document has to communicate with uBO's main process, and consequently must be of the same origin as uBO, and this is not possible with a `data:` URI, which is its own origin. How is the document you use in your personal build different from the default one? Which feature are you missing in the current click2load.html document?
Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Thu Nov 26, 2020 4:48 pm

Hi gorhill, nice to see you here and thanks for your response :)
gorhill wrote:
Thu Nov 26, 2020 3:18 pm
How is the document you use in your personal build different from the default one?
The document in my personal build is just an attempt to reproduce the default µMatrix frame placeholder document. I added it as an additional resource, leaving all default resources as-is. Here's my custom document -

Code: Select all

<!DOCTYPE html>
<html><head>
<meta charset="utf-8"/>
<style>
body {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAABGdBTUEAALGPC/xhBQAAAAJiS0dEAP+Hj8y/AAAAB3RJTUUH3wwIAAgyL/YaPAAAACJJREFUCFtjfMbOAAQ/gZiFnQPEBAEmGIMIJgtIL8QEgtoAIn4D/96X1KAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMTItMDhUMDA6MDg6NTArMDM6MDAasuuJAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTEyLTA4VDAwOjA4OjUwKzAzOjAwa+9TNQAAAABJRU5ErkJggg==") repeat scroll #fff;
color: gray;
font: 12px sans-serif;
margin: 0;
overflow: hidden;
padding: 2px;
white-space: nowrap;
}
a {
color: inherit;
padding: 0 3px;
text-decoration: none;
}
svg {
display: inline-block;
fill: gray;
height: 12px;
vertical-align: bottom;
width: 12px;
}
</style></head><body>
<span><a target="_blank">
<svg viewBox="0 0 1792 1792"><path transform="scale(1,-1) translate(0,-1536)" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" /></svg>
</a></span>
<script src="../js/umatrix-frame-placeholder.js"></script>
</body></html>
umatrix-frame-placeholder.js

Code: Select all

(() => {
  const url = new URL(self.location.href);
  const frameURL = url.searchParams.get('url');

  const a = document.querySelector('a');
  a.href=a.title=frameURL;
  a.after(frameURL);
})();
gorhill wrote:
Thu Nov 26, 2020 3:18 pm
Which feature are you missing in the current click2load.html document?
I'm not missing anything in click2load.html, I'm happy with click2load.html being exactly as it is. My goal is to have the above custom document as an additional, separate resource.

I have this document as a default placeholder for blocked 3rd-party frames, and use click2load.html for some specific cases (e.g. embedded Twitch streams).
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Wed Dec 23, 2020 1:55 am

So does this merit a formal uBlock Origin issue? either requesting to add the ability for custom resources to know/use the blocked URL (which is not currently possible as gorhill noted above), or would it be better to just have this document added as a built-in resource?
*Always* check the changelogs BEFORE updating that important software!
-

barbaz
Senior Member
Posts: 9825
Joined: Sat Aug 03, 2013 5:45 pm

Re: RIP µMatrix?

Post by barbaz » Thu Dec 24, 2020 5:34 pm

gorhill wrote:
Thu Nov 26, 2020 3:18 pm
with a `data:` URI,
This PoC would seem to show that what I'm seeking here could be possible in theory? -

Code: Select all

data:text/html,<div></div><script>window.addEventListener('DOMContentLoaded', ()=>{let u = new URL(window.location.href);document.getElementsByTagName('div')[0].textContent=u.searchParams.get('url');if(document.body.lastChild instanceof Text)document.body.lastChild.remove();},false);</script>?url=https%3A%2F%2Flocal.test%2F
*Always* check the changelogs BEFORE updating that important software!
-

gorhill
Junior Member
Posts: 47
Joined: Sun Mar 30, 2014 12:19 pm

Re: RIP µMatrix?

Post by gorhill » Sat Dec 26, 2020 6:20 pm

barbaz wrote:
Thu Dec 24, 2020 5:34 pm
This PoC would seem to show that what I'm seeking here could be possible in theory? -

Code: Select all

data:text/html,<div></div><script>window.addEventListener('DOMContentLoaded', ()=>{let u = new URL(window.location.href);document.getElementsByTagName('div')[0].textContent=u.searchParams.get('url');if(document.body.lastChild instanceof Text)document.body.lastChild.remove();},false);</script>?url=https%3A%2F%2Flocal.test%2F
So you just want a clickable URL to open the frame in its own tab without ever the need to load the content of the frame itself? Probably best to open an issue, I am unsure to understand correctly what you really want, and once I understand it, I will have to decide whether I agree or not, and if I agree, whether it's an advanced setting and so on.
Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Post Reply