Page 2 of 3

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Fri, 05 Jan 2018, 23:42
by calibrations
That's my github! Sorry I'm so late to the party, I was having trouble getting a confirmation email through to register on here.

There were a number of problems with newer versions built from source that I have tried to patch myself, but I must first admit that I am a complete and utter noob with no experience other than playing around in python for personal use. In particular things like the referer spoofer and as you've noticed blocking inline scripts were broken, I think I have fixed those but cannot be sure I haven't made any mistakes. I hope someone can look at my code (in legacy firefox branch) and look for anything obvious or bad style or the like.

Anyways, I was going to ask if there is anyone with more experience who might be able to assist with a proper fork so people who are unable to build from source can still use it . I have attached my patches that I have so far to be applied to version 1.2.0, with the only bug I know of being that blocking web workers doesn't work in Pale Moon (it works fine in Firefox 52, but I think it can't be made to work until support for child-src in Content Security Policy is added for those interested). Test at your own risk!

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sat, 06 Jan 2018, 00:08
by Moonchild
For the record, "child-src" was already obsolete when it landed in the spec. It should not be used.

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sat, 06 Jan 2018, 00:35
by ketmar
2calibrations: it looks like your patch is working (and mine was completely wrong, lol). i didn't do a proper check, tho (only checked that sites are really blocked, and inline scripts aren't fired anymore). anyway, i switched to your patched version, so i think we'll see if something will go wrong. ;-)

tnx for your work!

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sat, 06 Jan 2018, 00:41
by ketmar
2Moonchild: will Pale Moon have "worker-src" implemented then? or it is already there, and i missed it?

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sat, 06 Jan 2018, 14:31
by calibrations
Thanks for the heads up Moonchild, I'll keep that in mind :) I had seen that it was deprecated in Pale Moon issue 949 when I was looking for more information on it, I was trying to point out to people not to expect it to work but perhaps I should have been clearer. I'd left it in for now incase anyone wanted to to try it out with Firefox ESR where it does still work (even the Webextension version of uMatrix uses it, Chrome is still the only browser with worker-src it seems).

Ketmar I don't think you were far wrong, you were looking in the right places at least. Thanks for your patches so far, I wouldn't have been inspired to look without your first patch :D

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Wed, 21 Feb 2018, 11:05
by jars_
Not working tab "hosts files", not shown default files with block-rules. Trying version 1.21b2
with patch 0001-pm-messaging-API-hackfix.patch ketmar
error 1.21b2
Image
working version v 1.16
Image
Is there a solution for this case?

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 12:47
by jars_
version uMatrix 1.3.2 works fine, without any patches ;)

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 12:59
by ketmar
no, it doesn't.

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 13:57
by Moonraker
ketmar wrote:no, it doesn't.

Are you going to be punch or judy...?..lol. :D

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 14:11
by jars_
no, it doesn't.

:?: it`s not perfect, had an error in Console, yes...

Code: Select all

Метка времени: 04.03.2018 15:43:18
Ошибка: uncaught exception: Error opening input stream (invalid filename?): chrome://umatrix/content/js/contentscript-end.js

and this is not very good, but works; blocking scripts and xhr, all options shown correctly - which is exactly what I need.
To fix this error would be good, of course. But I have not yet noticed any consequences. :think:

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 14:34
by jars_
there is still no such file(contentscript-end.js), so just comment out the line 306 in frameModule.js to get rid of the error.
frameModule.js :
line 306: // lss(this.contentBaseURI + 'contentscript-end.js', sandbox);

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Sun, 04 Mar 2018, 14:40
by ketmar
it doesn't block all scripts without proper fix. you just happened to not notice those rare circumstances where it doesn't. please, don't tell that "it works" until you fully understand how exactly uMatrix works internally, and why some internal errors matters or not.

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Fri, 23 Mar 2018, 15:48
by nicolaasjan
I was able to build uMatrix up until version 1.3.2 (albeit with the contentscript-end.js error in the console), but with 1.3.4 I get this where the icon should be:

Image

When I hover over it, a small rectangle shows and when I click on it the uMatrix interface opens.
Is there a way to fix this bug and the script error as well?

For now I have disabled uMatrix and enabled NoScript again...

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Fri, 23 Mar 2018, 16:36
by ketmar
but what is wrong with using the old version, which works perfectly?

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Wed, 18 Jul 2018, 04:29
by Baloo
I'm still using the last Firefox XUL version of uMatrix in Pale Moon, 1.1.4. Are there any plans to continue the possibility of forking it for Pale Moon users? Right now it's been working just fine though.

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Wed, 18 Jul 2018, 13:29
by ketmar
tbh, i don't see any reason to fork it. as you said, the old version is working ok, and i honestly cannot see anything i need to fix/add so badly that i have to fork uM. as Pale Moon is not going to break extensions with each new release (i am currently on PM 28 beta, and everything still works ;-), i don't think that there is a real need to fork uM. if uM will ever stop working, we'll return to this question, but until then, it is fine as it is now, i believe. for now, i am using uM, and if it will break, i'll prolly try to fix it.

of course, there can be other brave souls, and somebody may create a fork. that will be great, 'cause it will free me from one constant headache (watching for uM to not break ;-).

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Mon, 14 Jan 2019, 23:56
by MoonSavvy
tl;dr --> uMatrix 1.3.2 works perfectly in all latest PM versions and is much improved over v1.1.4 (last official XUL version) <--

An update about uMatrix functionality in Pale Moon (for those who use uMatrix and/or are interested) is that uMatrix 1.3.2 released in Jan 2018 has been working perfectly for me in PM over the past year including with all PM versions through 28.2.2 (most recent PM release at the time of this post).

A number of bugfixes/improvements for uMatrix are included in v1.3.2 that are not in v1.1.4, with a big change being the addition of a global scope button (the star) in the pop-out panel. The star button was added in version 1.1.8 and makes it much easier to do global scope changes than in earlier versions.

To make uMatrix 1.3.2 for PM one can follow the below steps (an updated version of steps from this earlier post, with newer file names as appropriate). These steps are intended to be run on a Linux system though should work fine in Cygwin or a similar Linux subsystem running on Windows (python must also be installed and working correctly, steps to check this on Debian/Ubuntu based distributions are in the OP for this topic):

  1. Start in the home directory

    Code: Select all

    cd ~

  2. Download uMatrix 1.3.2 source code

    Code: Select all

    wget https://github.com/gorhill/uMatrix/archive/1.3.2.tar.gz -O uMatrix-1.3.2.tar.gz

  3. Extract uMatrix 1.3.2 source code

    Code: Select all

    tar -xzvf uMatrix-1.3.2.tar.gz

  4. Enter the new uMatrix directory

    Code: Select all

    cd ~/uMatrix-1.3.2

  5. Download the patch file (from this post)

    Code: Select all

    wget https://forum.palemoon.org/download/file.php?id=9837 -O for-1.2.0.patch

  6. Apply the patch file

    Code: Select all

    patch -p1 < for-1.2.0.patch

  7. Build the XPI bundle

    Code: Select all

    tools/make-firefox.sh all

    The new XPI module will be at the following path:

    Code: Select all

    ~/uMatrix-1.3.2/dist/build/uMatrix.firefox.xpi

This XPI file can simply be dragged into Pale Moon to install it, the same as for any other extension. Note that although the linked patch was created for v1.2.0 it works perfectly for creating a functional XUL extension up through uMatrix v1.3.2, including relative to blocking of inline scripts. The informative BrowserLeaks test page here is a quick way to confirm whether uMatrix is working correctly relative to inline, same-origin and also third-party scripts.

For uMatrix 1.3.4 and higher the pop-out panel fails to render properly in PM (either 27.x or 28.x) even after applying the linked "for 1.2.0" patch, thus making uMatrix impossible to use. Creating a fork of uMatrix and doing some serious code debugging might reveal why the pop-out panel fails to render for v1.3.4+ though with v1.3.2 working perfectly it is not really a priority.

Perhaps at least a fork on GitHub for uMatrix 1.3.2 with a pre-created XPI download that has the patch already integrated would be handy for Pale Moon users. So if I get around to that I will post back to this topic to let folk know (and maybe with a working PM-specific fork of uMatrix 1.3.2 the good folks who create Pale Moon would even be happy to host it on the main PM extensions site)! 8-)

Off-topic:
A final slightly off-topic (though useful for some) note is that the uMatrix 1.3.2 extension created by the above steps also installs and works fine with Firefox ESR 52.x, being the last useful Firefox version for many people due the bizarre (?!) choice the Mozilla Foundation made (shooting in foot) to entirely remove XUL extension support after FF v52 and switch to Web Extensions, thus turning Firefox into "Fire-Chrome" (and obliging however many thousands/millions of long-term FF users who depend on XUL extensions for their work to ditch FF for greener pastures, such as provided by Pale Moon!).

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Tue, 15 Jan 2019, 00:05
by back2themoon
Thank you for the update, MoonSavvy - quite promising stuff. :thumbup:

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Thu, 07 Feb 2019, 17:51
by jars_
For uMatrix 1.3.4 and higher the pop-out panel fails to render properly in PM

hehe... i make a CSS-style in userChrome.css for button bug:

Code: Select all

#umatrix-legacy-button[badge]::before { content: "uM" !important; font: bold 1em Arial !important; }

it looks like this Image
in last XUL-compatible version uMatrix 1.3.12 (internal number 1.3.3b8) :)

Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)

Posted: Fri, 15 Feb 2019, 07:08
by r4and0mUs3r
For anyone interested .. decided to have a go at building this according to MoonSavvy's post ..

... building uMatrix v1.3.2 : v1.3.4 : v1.3.6 with the patch, they each appear to work correctly according to checking them at the BrowserLeaks page .. with the exception of the Icon/button not being available/visible in the latter two.

Found this .. the "Update Badge" section in the v1.3.2 "tabs.js" file is the only significant difference in that file between the three versions. Copying just that section of code from v1.3.2 to 1.3.4 or 1.3.6 results in the Icon/button being usable again.

This appears to work because it seems the rest of the icon breaking changes were not incorporated until v1.3.8 .. and from that version up, trying the same thing no longer works.
It's only a partial solution, if that, but maybe it's helpful ..

cheers.