Pure URL for Palemoon

Dedicated board for extension releases/support threads

Moderators: Lootyhoof, FranklinDM

Forum rules
Please do not create new topics here unless you are an extension author in need of a dedicated releases&support thread!
KlarkKentThe3rd
Astronaut
Astronaut
Posts: 584
Joined: 2018-04-20, 20:31

Re: Pure URL for Palemoon

Unread post by KlarkKentThe3rd » 2020-06-23, 19:35

Code: Select all

Timestamp: 6/23/20, 15:32:26
Warning: unreachable code after return statement
Source File: https://static.xx.fbcdn.net/rsrc.php/v3/y5/r/G0MKLmeCe1o.js?_nc_x=-VUSy371hv8
Line: 51, Column: 1450
Source Code:
ight: 1.5","color: #723874;"]});function ea(a){var b;return;(b=console).error.apply(b,da("\n        An error has occurre

Timestamp: 6/23/20, 15:32:26
Warning: unreachable code after return statement
Source File: https://static.xx.fbcdn.net/rsrc.php/v3/y5/r/G0MKLmeCe1o.js?_nc_x=-VUSy371hv8
Line: 51, Column: 60274
Source Code:
publicId!==""});function ze(){c.useEffect(function(){return;xe(te.react,d.version);ye(document)},[])}function Ae(a){var 

Timestamp: 6/23/20, 15:32:26
Warning: unreachable code after return statement
Source File: https://static.xx.fbcdn.net/rsrc.php/v3/y5/r/G0MKLmeCe1o.js?_nc_x=-VUSy371hv8
Line: 51, Column: 62388
Source Code:
wY};return Ke(a,He)||Ke(a,Ie)},Ne=function(){return!1;var a;pe();var b;document.documentElement;b?void 0:q(!1);if(!Me(a)

Timestamp: 6/23/20, 15:32:29
Warning: Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Error console WITHOUT intercepting requests. Why does this not work? I am doing what you tell me to do, and this seems like garbage information.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-24, 07:46

Those are just javascript errors, no relation to the extension. If you turn off 'intercept requests', refresh the FB page again and try.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-24, 13:46

Changelog for 2.4.4
  • To reduce ambiguity, the log message for fixed requests has been changed from Original/cleaned URL to Original/cleaned request.
  • Pure URL now has a homepage with a guide and screenshots :mrgreen: ! Updated install manifest.
  • Removed generic garbage field 'ref' from the default list, it broke Gitlab.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

KlarkKentThe3rd
Astronaut
Astronaut
Posts: 584
Joined: 2018-04-20, 20:31

Re: Pure URL for Palemoon

Unread post by KlarkKentThe3rd » 2020-06-24, 14:40

That was very helpful of you, to improve the logging.

Facebook image replying, requests intercepted (image adding failure):

Code: Select all

[PureURL:]Original request: https://www.facebook.com/ajax/ufi/upload/?av=100005304496715&profile_id=100005304496715&source=19&target_id=100005304496715&__user=100005304496715&__a=1&__dyn=7AgNe-4amaUmgDxyHqAyqomzEdoKEnAG8F4Wodo9ES2N6wAxu13wFw_xebmbxK5WAAzokKaxeUW3KawUz8S2S4og-2h1y78O5UlwkEkxaaxG4o4O5K265UB0WG7ElwupVk3K6U8o98pKEtxy5Voy6oswTgC3mbx-9wNwnK6E_UswqqzFUiAz8be7VbBojU8UlzUOmVojwAwAxG5o42czocGz946-eKi8wGwFyFE-3m4oO68gy898e8Wqexp2UtGezEvwEy8ix21RxWEb8bGwCxe12xaUy58ym2mfxW68gABwkUjwVxe5E7622362W2K4E9ojwgrw&__csr=&__req=r&__beoa=0&__pc=PHASED%3ADEFAULT&dpr=1&__ccg=EXCELLENT&__rev=1002287347&__s=ff504j%3Aa08we9%3A3le3h7&__hsi=6841922103405103024-0&__comet_req=0&fb_dtsg=AQE4alHeFm8M%3AAQEWS4nxJWKg&jazoest=22021&__spin_r=1002287347&__spin_b=trunk&__spin_t=1593008782
Cleaned request:https://www.facebook.com/ajax/ufi/upload/?av=100005304496715&profile_id=100005304496715&target_id=100005304496715&__user=100005304496715&__a=1&__dyn=7AgNe-4amaUmgDxyHqAyqomzEdoKEnAG8F4Wodo9ES2N6wAxu13wFw_xebmbxK5WAAzokKaxeUW3KawUz8S2S4og-2h1y78O5UlwkEkxaaxG4o4O5K265UB0WG7ElwupVk3K6U8o98pKEtxy5Voy6oswTgC3mbx-9wNwnK6E_UswqqzFUiAz8be7VbBojU8UlzUOmVojwAwAxG5o42czocGz946-eKi8wGwFyFE-3m4oO68gy898e8Wqexp2UtGezEvwEy8ix21RxWEb8bGwCxe12xaUy58ym2mfxW68gABwkUjwVxe5E7622362W2K4E9ojwgrw&__csr=&__req=r&__beoa=0&__pc=PHASED%3ADEFAULT&dpr=1&__ccg=EXCELLENT&__rev=1002287347&__s=ff504j%3Aa08we9%3A3le3h7&__hsi=6841922103405103024-0&__comet_req=0&fb_dtsg=AQE4alHeFm8M%3AAQEWS4nxJWKg&jazoest=22021&__spin_r=1002287347&__spin_b=trunk&__spin_t=1593008782
Requests left alone:

Code: Select all

An error occurred updating the cmd_undo command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
An error occurred updating the cmd_redo command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
An error occurred updating the cmd_cut command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
An error occurred updating the cmd_paste command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
An error occurred updating the cmd_delete command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
An error occurred updating the cmd_switchTextDirection command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.isCommandEnabled]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 64"  data: no]  
globalOverlay.js:69
I used Browser Console this time, since the Error Console was giving me nothing (cuz everything was fine).

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-24, 16:02

You just have to compare the parameters in the original vs the filtered URL. In this case, the culprit is 'source@facebook.com'. Remove it from the garbage fields list and it should be fine. I've removed it as well, will publish an update.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-24, 16:17

Changelog for 2.4.5
  • Removed garbage field 'source@facebook.com' from default list due to breaking Facebook. Thanks KlarkKentThe3rd for spotting this!
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

KlarkKentThe3rd
Astronaut
Astronaut
Posts: 584
Joined: 2018-04-20, 20:31

Re: Pure URL for Palemoon

Unread post by KlarkKentThe3rd » 2020-06-24, 20:25

But......... I already manually removed source(at)facebook, and even told you about it in this thread........

EDIT: I also remember re-adding the "garbage". Now I deleted it AGAIN, and NOW it works. Did I really have to refresh the page, was that all it takes?? :wtf:

User avatar
bawldiggle
Lunatic
Lunatic
Posts: 446
Joined: 2013-02-22, 21:16
Location: East Coast Australia

Re: Pure URL for Palemoon

Unread post by bawldiggle » 2020-06-25, 01:48

@ moonbat

Thank you for the updates.
Following this thread is very interesting; all the fine tuning
Off-topic:
Stay safe ... lockdown again ?
;)
Win-7 PRO 64-bit
Palemoon; auto updates current version (32-bit)

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 03:13

KlarkKentThe3rd wrote:
2020-06-24, 20:25
But......... I already manually removed source(at)facebook, and even told you about it in this thread........
It was part of the default list, which means anyone else who installs it or resets the fields preference would also face the same problem in future.
KlarkKentThe3rd wrote:
2020-06-24, 20:25
Did I really have to refresh the page, was that all it takes?? :wtf:
Yup - it does its thing when you load the page. Internally it would've already cached the list of fields to be processed, when you refresh the page it will again reload the field list and then get the new values.
bawldiggle wrote:
2020-06-25, 01:48
@ moonbat

Thank you for the updates.
Following this thread is very interesting; all the fine tuning
You're welcome :)
The extension is feature complete for now, so best I can do is fine tuning the default parameter list based on feedback. Tried to install it in Basilisk, but wouldn't you know, it doesn't play well with Australis, and the toolbar button isn't even shown in the customization dialog. :coffee:
There's the original jetpack version from CAA that still works with it though.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
nicolaasjan
Moon lover
Moon lover
Posts: 97
Joined: 2017-07-28, 14:44
Location: the Netherlands

Re: Pure URL for Palemoon

Unread post by nicolaasjan » 2020-06-25, 07:48

moonbat wrote:
2020-06-25, 03:13
Tried to install it in Basilisk, but wouldn't you know, it doesn't play well with Australis, and the toolbar button isn't even shown in the customization dialog. :coffee:
There's the original jetpack version from CAA that still works with it though.
Just installed this version from CAA (1.2.6) in Basilisk, but it doesn't even remove the 'ved' parameter from google, while your version removes it in Pale Moon... :thumbup:

However, what I just noticed is, when upgrading to your version 2.4.5, that new garbage parameters are not added to my prefs...
What can I do about that, apart from manually pulling them out of the .xpi file (pureurl4pm.js) and inserting them in my prefs?

My current prefs are:

Code: Select all

user_pref("extensions.pure-url@palemoon.garbage_fields", "ved, ei@google.nl, ei@google.com, gs_l, amp,utm_source, utm_medium, utm_term, utm_content, utm_campaign, utm_reader, utm_place, ga_source, ga_medium, ga_term, ga_content, ga_campaign, ga_place, yclid, _openstat, feature@youtube.com, fb_action_ids, fb_action_types, fb_ref, fb_source, action_object_map, action_type_map, action_ref_map, ref@facebook.com, fref@facebook.com, hc_location@facebook.com, ref_@imdb.com, src@addons.mozilla.org, fbclid@facebook.com, sdsrc, ref, trk, __tn__, cid, from, pfmredir, igshid");
Linux Mint 21.3 MATE 64bit
Pale Moon latest

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 09:49

You can change the parameters from the addon settings. Go to the addons page for it, and click preferences, there is a text input with all the garbage parameters right there. I created my fork mainly because I found this a pain to use when there are many parameters.

My version doesn't work properly with Basilisk yet, I'll have to see about porting it. If you're on Basilisk, best to stick with the CAA version for now.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37756
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Pure URL for Palemoon

Unread post by Moonchild » 2020-06-25, 10:10

moonbat wrote:
2020-06-25, 09:49
My version doesn't work properly with Basilisk yet, I'll have to see about porting it. If you're on Basilisk, best to stick with the CAA version for now.
Unless and until you fix this, it's probably a good idea to remove the Firefox targetApplication block (unless you are also targeting other applications that use the Firefox GUID?)
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 10:18

As of now it doesn't target Basilisk, turns out I forgot to include an overlay entry in chrome.manifest, and with that I'm able to get it run locally without hassles. I want to target it for all UXP applications - so far Pale Moon and Borealis both run it well.

Can I target Firefox/Basilisk (since the identifier is the same, but of course it is meant for Basilisk or pre 57 Firefox only) both in the same XPI and publish it on Phoebus for both browsers? I thought I heard about extensions targeting Firefox being blocked from the addons site or something like that.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37756
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Pure URL for Palemoon

Unread post by Moonchild » 2020-06-25, 10:23

moonbat wrote:
2020-06-25, 10:18
Can I target Firefox/Basilisk (since the identifier is the same, but of course it is meant for Basilisk or pre 57 Firefox only) both in the same XPI and publish it on Phoebus for both browsers? I thought I heard about extensions targeting Firefox being blocked from the addons site or something like that.
if your install.rdf includes multiple targetApplication blocks you can target multiple applications from a single XPI. That's one of the nice things about this install method ;)
I'm sure you still have the firefox one in there or it wouldn't be valid for Basilisk as install target anyway. Other UXP browser are probably also using the Firefox GUID so... I guess my suggestion was moot if you want to keep compat with them.

Extensions only targeting Firefox will eventually be blocked in Pale Moon (since Pale Moon has its own target and unaltered Firefox extensions are just going to continue to break more than they already have). That's what you heard. That has nothing to do with Phoebus, though.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 10:30

Moonchild wrote:
2020-06-25, 10:23
Extensions only targeting Firefox will eventually be blocked in Pale Moon
I'm guessing this is to prevent people publishing it with just a min/max version change, apart from not targeting PM itself when it is a separate application by now.

PureURL looks good so far on Basilisk - I guess I'll publish it with the Firefox GUID officially updated :)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
nicolaasjan
Moon lover
Moon lover
Posts: 97
Joined: 2017-07-28, 14:44
Location: the Netherlands

Re: Pure URL for Palemoon

Unread post by nicolaasjan » 2020-06-25, 10:40

moonbat wrote:
2020-06-25, 09:49
You can change the parameters from the addon settings. Go to the addons page for it, and click preferences, there is a text input with all the garbage parameters right there. I created my fork mainly because I found this a pain to use when there are many parameters.

My version doesn't work properly with Basilisk yet, I'll have to see about porting it. If you're on Basilisk, best to stick with the CAA version for now.
I uninstalled Pure URL, deleted the garbage fields in prefs.js and installed it again.
Now all the garbage parameters are up to date. :D
Do I have to do this every time new parameters are added to your build?
As I understand, they are not added automatically during an update.

Something else I noticed while visiting https://www.google.com/search?q=terri%C ... =isch&sa=X:
In the error console there are thrown several Pure URL related erors like :

Code: Select all

Tijdstempel: 25-06-20 12:18:48
Fout: [PureURL error:] path= /gen_204?s=web&t=aft&atyp=csi&ei=B3r0XrTEN9HBkwW6urqIDw&rt=wsrt.122,aft.856,prt.480,sct.434&bl=tdrq&ima=5&imad=5&imn=14
modified path=/gen_204?s=web&t=aft&atyp=csi&rt=wsrt.122,aft.856,prt.480,sct.434&bl=tdrq&ima=5&imad=5&imn=14
[Exception... "Component returned failure code: 0x80004004 (NS_ERROR_ABORT) [nsIURI.path]"  nsresult: "0x80004004 (NS_ERROR_ABORT)"  location: "JS frame :: chrome://pureurl4pm/content/common.jsm :: observe :: line 154"  data: no]
Bronbestand: chrome://pureurl4pm/content/common.jsm
Regel: 157
There are some more and they have in common that they all end with:

Code: Select all

[Exception... "Component returned failure code: 0x80004004 (NS_ERROR_ABORT) [nsIURI.path]"  nsresult: "0x80004004 (NS_ERROR_ABORT)"  location: "JS frame :: chrome://pureurl4pm/content/common.jsm :: observe :: line 154"  data: no]
Bronbestand: chrome://pureurl4pm/content/common.jsm
Regel: 157
Linux Mint 21.3 MATE 64bit
Pale Moon latest

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 10:47

nicolaasjan wrote:
2020-06-25, 10:40
Do I have to do this every time new parameters are added to your build?
No, not at all - it will get updated automatically whenever I make changes and publish :)

The errors occur for certain URLs, it's a mystery why it chokes on them with NS_ERROR_ABORT because it doesn't provide any other information why it failed.
The modified path is correct, if you join it to the hostname of the site in question, it opens fine.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 10:49

Changelog for 2.5
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
nicolaasjan
Moon lover
Moon lover
Posts: 97
Joined: 2017-07-28, 14:44
Location: the Netherlands

Re: Pure URL for Palemoon

Unread post by nicolaasjan » 2020-06-25, 11:01

moonbat wrote:
2020-06-25, 10:47
nicolaasjan wrote:
2020-06-25, 10:40
Do I have to do this every time new parameters are added to your build?
No, not at all - it will get updated automatically whenever I make changes and publish :)

The errors occur for certain URLs, it's a mystery why it chokes on them with NS_ERROR_ABORT because it doesn't provide any other information why it failed.
The modified path is correct, if you join it to the hostname of the site in question, it opens fine.
Thanks!
It looked a bit scary, written in bold font in the console.

Still wondering why my parameters weren't updated properly before.
Linux Mint 21.3 MATE 64bit
Pale Moon latest

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5603
Joined: 2015-12-09, 15:45

Re: Pure URL for Palemoon

Unread post by moonbat » 2020-06-25, 11:04

If you mean parameters from the CAA version - that is a different extension with a different ID, so it can't be directly ported. You can always copy the string value for extensions.pure-url@palemoon.garbage_fields from about:config for backup though.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net