Request help with http modify response

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
frostknight
Lunatic
Lunatic
Posts: 437
Joined: 2022-08-10, 02:25

Request help with http modify response

Unread post by frostknight » 2024-11-21, 04:28

I find sometimes I go onto certain webpages and I get some sort of weird reaction to some sort of useragent sniffer sometimes.

And for this reason, I wondered, how do you add multiple filters correctly so the first still works as does the others?
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

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

Re: Request help with http modify response

Unread post by moonbat » 2024-11-21, 04:49

They're all Javascript arrays, so you add them after the first one as comma separated values.
Roughly like this:

Code: Select all

[[filter set 1],[filter set 2]]
"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

User avatar
frostknight
Lunatic
Lunatic
Posts: 437
Joined: 2022-08-10, 02:25

Re: Request help with http modify response

Unread post by frostknight » 2024-11-21, 05:14

moonbat wrote:
2024-11-21, 04:49
They're all Javascript arrays, so you add them after the first one as comma separated values.
Roughly like this:

Code: Select all

[[filter set 1],[filter set 2]]

How would i do it with this just for a visual aid...

[["/^/",["/browser-detect-/",["/.*/g",""]],["/^\\/assets\\/discourse-[0-9a-f]{4}/",["(.d-modal-legacy\"","(.d-modal-legacy)\"","document.execCommand(\"insertText\",!1,","this._textarea.setRangeText("]]]]
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

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

Re: Request help with http modify response

Unread post by moonbat » 2024-11-21, 05:27

Can't figure out what this is - maybe adoxa can help.
"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

User avatar
adoxa
Lunatic
Lunatic
Posts: 339
Joined: 2019-03-16, 13:26
Location: Qld, Aus.
Contact:

Re: Request help with http modify response

Unread post by adoxa » 2024-11-21, 05:27

Remove the last ] from the existing filter, add a ,, paste in the new filter without the initial [.

Code: Select all

[[existing filter]]],["/^/"...]]]]
Don't forget to enable it again.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-21, 20:33

frostknight wrote:
2024-11-21, 04:28
I wondered, how do you add multiple filters correctly so the first still works as does the others?
I made the Modify HTTP Response 1.0 add-on inspired by JustOff's add-on Modify HTTP Response 1.3.8.

My add-on is easier to use and has some additional options.

Comparison between the filter for the Modify HTTP Response 1.3.8 add-on by JustOff and the filter for my add-on Modify HTTP Response 1.0 (Tellu White). My approach eliminates the need to "escape" characters that are not special characters in RegEx:

ChatGPT is now broken. Drats. (Can't do anything in Goanna on ChatGPT)

https://forum.palemoon.org/viewtopic.php?f=70&t=31772

adoxa » 2024-11-16
Oops, I missed the closing bracket. Here's an update that does relax the path test.
Filter for Modify HTTP Response 1.3.8 add-on by JustOff :

Code: Select all

[["cdn.oaistatic.com",["/\\/assets\\/.{16}\\.js/",["$/d","$/","/(g\\.getBoundingClientRect\\(\\)|p\\[0\\])\\.toJSON\\(\\)/g","JSON.stringify($1)"]],["/root.*\\.css/",["/min\\(.*?,/g","calc("]]]]
Filter for my Modify HTTP Response 1.0 add-on ( Tellu White ) :

Code: Select all

[[`cdn.oaistatic.com`, `/\/assets\/.{16}\.js/`, [`$/d`, `$/`], [`/(g\.getBoundingClientRect\(\)|p\[0\])\.toJSON\(\)/g`, `JSON.stringify($1)`]], [`cdn.oaistatic.com`, `/root.*\.css/`, [`/min\(.*?,/g`, `calc(`]]]
HTTP Response 1.0 Screenshots:

My add-on uses "template literals":
00 The ''backtick'' (`) character inside a ''template strings'' must be DOUBLED (``).png
02.png
After "Right-Click" on Button:
03.png
Restore Filters From Backup ( Replaces Existing Filters ! ):
05.png
07.png
Add Filters From Backup ( To Current Filters ):
09.png
10.png
Backup Filters ( Copy to Clipboard ):
21.png
22.png
"Shift + Click" on Button = Open "Requests Info" + Get HTTP Response:
32.png

Code: Select all

request.URI.spec : https://cdn.sstatic.net/Js/modules/cookie-consent.en.js?v=36bebc18e04f

data : (()=>{"use strict";var t={p:""};t.p=document.getElementById("webpack-public-path").innerText+"Js/",(()=>{function t(){}var e=function(t,e,o){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:o?"".concat(o," ",e):e})};function o(c,a,r,i,w){return{withTargets:(...t)=>o(c,[...a,...t],r,i,w),withValues:t=>o(c,a,{...r,...t},i,w),withClasses:(...t)=>o(c,a,r,[...i,...t],w),withElementType:()=>o(c,a,r,i,w),withOutlet:t=>o(c,a,r,i,[...w,t.controllerName]),withNamedOutlet:t=>o(c,a,r,i,[...w,t]),build:()=>{var o;return{Base:(o=class extends n{},e(o,"Base"),o.controllerName=c,o.targets=a,o.values=r,o.classes=i,o.outlets=w,o),stimulusCallback:t}}}}const n=function(){const t=new(Stacks.createController({}))({}),e=Object.getPrototypeOf(t),o=Object.getPrototypeOf(e);return Object.getPrototypeOf(o).constructor}(),c=window.Stacks;StackExchange=window.StackExchange=window.StackExchange||{},StackOverflow=window.StackOverflow=window.StackOverflow||{},StackExchange=window.StackExchange=window.StackExchange||{},StackOverflow=window.StackOverflow=window.StackOverflow||{},StackExchange=window.StackExchange=window.StackExchange||{},StackOverflow=window.StackOverflow=window.StackOverflow||{};const{Base:a}=(r="cookie-settings",o(r,[],{},[],[])).withElementType().build();var r;window.OptanonWrapper=()=>{},function(t,e){for(const o of t){if(e&&!o.controllerName.startsWith(e))throw new Error(`The provided Stimulus controllers must be namespaced with "${e}"`);c.application.register(o.controllerName,o)}}([class extends a{toggle(){window.OneTrust.ToggleInfoDisplay()}}],"cookie-")})()})();
And so on!

In modify_HTTP_response_1_1_0.zip archive posted on mediafire.com there are more screenshots plus a HELP file.

Download link ( Modify HTTP Response 1.0 ):

https://www.mediafire.com/file/762rkme6xm5ncmk/modify_HTTP_response_1_0.zip/file

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

Re: Request help with http modify response

Unread post by Moonchild » 2024-11-21, 21:55

If you're going to fork an add-on, choose a different name to avoid confusion.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"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
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-21, 22:28

Moonchild wrote:
2024-11-21, 21:55
If you're going to fork an add-on, choose a different name to avoid confusion.
I didn't think about this issue because I made this add-on for personal use. Now I've noticed that there are some difficulties in adding new filters in Modify HTTP Response 1.3.8 add-on so I thought maybe my add-on will be useful for some users.

I've posted my add-on without making any modifications. If there are people interested in using my add-on (after testing it), I will post a modified version of it, taking into account your concern.

User avatar
frostknight
Lunatic
Lunatic
Posts: 437
Joined: 2022-08-10, 02:25

Re: Request help with http modify response

Unread post by frostknight » 2024-11-22, 00:36

tellu-white wrote:
2024-11-21, 22:28
Moonchild wrote:
2024-11-21, 21:55
If you're going to fork an add-on, choose a different name to avoid confusion.
I didn't think about this issue because I made this add-on for personal use. Now I've noticed that there are some difficulties in adding new filters in Modify HTTP Response 1.3.8 add-on so I thought maybe my add-on will be useful for some users.

I've posted my add-on without making any modifications. If there are people interested in using my add-on (after testing it), I will post a modified version of it, taking into account your concern.
I am probably going to test it myself, I very much hope you will do as Moonchild said. It looks like it might be helpful!

But like say this:


[["/^/",["/browser-detect-/",["/.*/g",""]],["/^\\/assets\\/discourse-[0-9a-f]{4}/",["(.d-modal-legacy\"","(.d-modal-legacy)\"","document.execCommand(\"insertText\",!1,","this._textarea.setRangeText("]]]]

How would I do that in your version? Just so I know?

I use this to make discourse work in palemoon.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-22, 15:45

tellu-white wrote:
2024-11-21, 22:28
[["/^/",["/browser-detect-/",["/.*/g",""]],["/^\\/assets\\/discourse-[0-9a-f]{4}/",["(.d-modal-legacy\"","(.d-modal-legacy)\"","document.execCommand(\"insertText\",!1,","this._textarea.setRangeText("]]]]

How would I do that in your version? Just so I know?

I use this to make discourse work in palemoon.
The filters used by Modify HTTP Response 1.3.8 (JustOff) need to be modified to be used in Modify HTTP Response 1.0 (Tellu White).

In this particular case, the filter for HTTP Response 1.0 (Tellu White) looks like this:

Code: Select all

[[`/^/`, `/browser-detect-/`, [`/.*/g`, ``]], [`/^/`, `/^\/assets\/discourse-[0-9a-f]{4}/`, [`(.d-modal-legacy"`, `(.d-modal-legacy)"`], [`document.execCommand("insertText",!1,`, `this._textarea.setRangeText(`]]]
Screenshots using (ONLY) this filter:
01.png
02.png
03.png
04.png
05.png
This is what "Filters Manager" looks like (after Click on Button):
06.png
*******

HELP - Differences between Filter Structures:

Modify HTTP Response 1.3.8 (JustOff)
07.png
Rules:

A "Filter" can contain ONLY ONE "Host".
ANY "Host" can appear in a SINGLE "Filter".
A "Filter" (a "Host") can have one or more DIFFERENT "Paths".
Each "Path" can have one or more "Search-Replace" pairs.

Modify HTTP Response 1.0 (Tellu White)
08.png
08.png (4.21 KiB) Viewed 1471 times
Rules:

A "Filter" can contain ONLY ONE "Host" with ONLY ONE "Path".
There can be more than one "Filter" with the same "Host" but DIFFERENT "Paths".
There CANNOT be more than one "Filter" with a "Host-Path" pair targeting the SAME "URL".
Each "Filter" (each "Host-Path" pair) can have one or more "Search-Replace" pairs.

EXCEPTIONS:

A "Filter" can have multiple "Hosts" and multiple "Paths" ONLY IF a RegEx with the OR (|) operator is used.
Example with 2 Hosts:
[`/google.com|bing.com/`, `/\/.*/`, [`/javascript/gi`, `REPLACE`]]

User avatar
frostknight
Lunatic
Lunatic
Posts: 437
Joined: 2022-08-10, 02:25

Re: Request help with http modify response

Unread post by frostknight » 2024-11-23, 03:03

tellu-white wrote:
2024-11-22, 15:45
03.png
This helped me quite a bit, I didn't know you could right click that icon for more options
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-25, 21:30

frostknight wrote:
2024-11-22, 00:36
But like say this:

[["/^/",["/browser-detect-/",["/.*/g",""]],["/^\\/assets\\/discourse-[0-9a-f]{4}/",["(.d-modal-legacy\"","(.d-modal-legacy)\"","document.execCommand(\"insertText\",!1,","this._textarea.setRangeText("]]]]

How would I do that in your version? Just so I know?
I use this to make discourse work in palemoon.
I added an important feature in my add-on: Convert Filter Syntax from Modify HTTP Response 1.3.8 (JustOff) to Intercept & Modify HTTP Response 2.0 (Tellu White) format.

As can be seen, I've also changed the name of my add-on in response to Moonchild's concern.

Right-Click on Button:
01.png
Example of how to use this new feature:

1. I've converted the filter used for discourse.org by the add-on Modify HTTP Response 1.3.8 (JustOff) :

Code: Select all

[["/^/",["/browser-detect-/",["/.*/g",""]],["/^\\/assets\\/discourse-[0-9a-f]{4}/",["(.d-modal-legacy\"","(.d-modal-legacy)\"","document.execCommand(\"insertText\",!1,","this._textarea.setRangeText("]]]]
02.png
I've got the following filter used by my add-on, Intercept & Modify HTTP Response 2.0 (Tellu White) :

Code: Select all

[[`/^/`, `/browser-detect-/`, [`/.*/g`, ``]], [`/^/`, `/^\/assets\/discourse-[0-9a-f]{4}/`, [`(.d-modal-legacy"`, `(.d-modal-legacy)"`], [`document.execCommand("insertText",!1,`, `this._textarea.setRangeText(`]]]
I ENTERED this FIRST (converted) filter in my add-on:
03.png
04.png
I opened the page https://meta.discourse.org/ :
05.png
2. I've converted the filter used for chatgpt.com by the add-on Modify HTTP Response 1.3.8 (JustOff) :

Code: Select all

[["cdn.oaistatic.com",["/\\/assets\\/.{16}\\.js/",["$/d","$/","/(g\\.getBoundingClientRect\\(\\)|p\\[0\\])\\.toJSON\\(\\)/g","JSON.stringify($1)"]],["/root.*\\.css/",["/min\\(.*?,/g","calc("]]]]
06.png
I've got the following filter used by my add-on, Intercept & Modify HTTP Response 2.0 (Tellu White) :

Code: Select all

[[`cdn.oaistatic.com`, `/\/assets\/.{16}\.js/`, [`$/d`, `$/`], [`/(g\.getBoundingClientRect\(\)|p\[0\])\.toJSON\(\)/g`, `JSON.stringify($1)`]], [`cdn.oaistatic.com`, `/root.*\.css/`, [`/min\(.*?,/g`, `calc(`]]]
I ADDED this SECOND (converted) filter in my add-on:
07.png
08.png
I opened the page https://chatgpt.com/ :
09.png
This is how the two (converted) filters look like in Filters Manager (opened with Click on Button):
10.png
Download link ( Intercept & Modify HTTP Response 2.0 ):

https://www.mediafire.com/file/noucel6jb3crc2l/Intercept_%26_Modify_HTTP_Response_2_0.zip/file

User avatar
frostknight
Lunatic
Lunatic
Posts: 437
Joined: 2022-08-10, 02:25

Re: Request help with http modify response

Unread post by frostknight » 2024-11-26, 14:39

I imagine, you could just upload it to palemoon addons potentially. It works decently from what I see.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-26, 17:35

My add-on ( Intercept & Modify HTTP Response 2.0 ) has a functionality which is not obvious and which I forgot to describe in my previous posts: how to delete a Filter and how to delete a Search-Replace pair belonging to a Filter.

I will illustrate on the filters used in the previous post.

First of all, I should mention that both the "filter" used for discourse.org and the "filter" used for chatgpt.com are actually Arrays of 2 Filters :
01.png
Thus, in order to delete the "filter" used for discourse.org OR for chatgpt.com I will actually have to delete two filters.

1. Deleting a Filter.

A single Filter ( NOT "All Filters" ) can only be deleted in Filters Manager ( opened by clicking the button ).
To delete a Filter, the HOST box ( OR PATH box ) must be cleared before clicking the Save filters & HTTP Observer Status button.

I will delete the 2 Filters used for discourse.org :
02.png
Result:
03.png
2. Deleting a Search-Replace pair.

A Search-Replace pair can only be deleted in Filters Manager ( opened by clicking the button ).
To delete a Search-Replace pair, the SEARCH box ( NOT REPLACE box ) must be cleared before clicking the Save filters & HTTP Observer Status button :
04.png
Result:
05.png
If a Filter has only one Search-Replace pair and it is deleted, then the whole Filter will be deleted:
06.png
Result:
07.png
***

Tip:

As can be seen, in the 2 Filters used for chatgpt.com ( for example ) there is no word chatgpt in any box (Host, Path, Search, Replace). After a while, a lot of Filters can add up and it will be difficult to find the Filters used for a particular website. For this reason, it is a good practice to make a Screenshot after each added Filter, specifying the website for which it is used:
08.png

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-27, 13:50

My add-on ( Intercept & Modify HTTP Response 2.0 ) has another functionality which is not obvious and which I forgot to describe in my previous posts: how to add a new Search-Replace pair to an existing Filter.
This can be done only in the Filters Manager (opened by clicking the button).

For example, I will add a new Search-Replace pair :

[`/target to be searched/g`, `replaced target`]

to the first Filter used in the previous comments. To do this, I need to make the following two steps:

1. Click in one of the "Host, Path, Search, Replace" boxes belonging to the first Filter, so that the mouse cursor will be in one of these boxes.

2. Click on the New search-replace button.
01.png
Result:
02.png
Has been created a new pair of empty Search-Replace boxes into which I will insert the Search-Replace content posted above:
03.png
Result:
04.png
***

To add a new Filter in Filters Manager just click on the New filter button. A new empty Filter will be created at the end of the existing filter list.

**********************

Important note for users who only want to use filters posted by other users.

The important functionality of my add-on - that reduces the insertion of a new filter to a few clicks - is described here: https://forum.palemoon.org/viewtopic.php?f=70&t=31829&sid=ad47468c57d2b57aa2eb6e1926987dc2#p257331

For some users, this is the only functionality they will need if they want to use my add-on.

EDIT:

They may also need to delete a filter that needs to be replaced or is no longer needed. This functionality is described here:

https://forum.palemoon.org/viewtopic.php?f=70&t=31829&sid=184af21610e68447d581d7a047c10ab7#p257348

Download link ( Intercept & Modify HTTP Response 2.0 ):

https://www.mediafire.com/file/noucel6jb3crc2l/Intercept_%26_Modify_HTTP_Response_2_0.zip/file

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-11-30, 18:36

Intercept & Modify HTTP Response 2.1

This is a small bugfix.

1. The last two entries in the list of options opened with right-click displayed a different mouse pointer than the other entries. I've fixed this bug:
01.png
2. If the only opened TAB is the one with the Filters Manager page, then after clicking on the Save filters & HTTP Observer Status button the Pale Moon will close - if it has the "Close the window when the last tab is closed" checkbox checked ( in "Tools / Preferences / Tabs" ). I've fixed this bug:
02.png
03.png
***

Download link ( Intercept & Modify HTTP Response 2.1 ):

https://www.mediafire.com/file/z207t2i5x9r4wlb/Intercept_&_Modify_HTTP_Response_2_1.zip/file

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-12-02, 20:56

Important notice for users of some Linux distros !

When I tested my add-on in Linux Mint Cinnamon, I found that there was a problem with using the ALT key in Pale Moon. Looking for an answer, I came to this page:

Problem with Alt key in Linux Mint

https://forums.linuxmint.com/viewtopic.php?t=403820

Following there instructions, I changed the setting that made the ALT key unavailable to Pale Moon (add-ons):
01.png
02.png
03.png
***

I tested my add-on ( Intercept & Modify HTTP Response 2.1 ) in Linux Mint 19.3 'Tricia - Cinnamon (32-bit).

Test Page:

https://stackoverflow.com/questions/31825090/nsitraceablechannel-intercept-http-traffic-code
04.png

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-12-03, 19:01

Intercept & Modify HTTP Response 2.1 (Tellu White) vs. Modify HTTP Response 1.3.8 (JustOff)

***

moonbat wrote : «Like so many extensions I've seen - this one ( Modify HTTP Response 1.3.8 by JustOff ) has a horrible UX. You as an end user shouldn't have to enter a programmatically correct array of arrays as a parameter.»

https://forum.palemoon.org/viewtopic.php?f=3&t=31281#p252911

adoxa wrote : «Did you miss "Launch Editor"? That allows separate editing of the host/path/search/replace strings.»

moonbat wrote : «That's fine but when one has to add a readymade string, it shouldn't need careful parsing of the actual code to insert correctly at the end.»

https://forum.palemoon.org/viewtopic.php?f=3&t=31281&start=20

***

My add-on ( Intercept & Modify HTTP Response 2.1 ) fixes both problems described above by moonbat :

1. In my add-on, you no longer need to "programmatically correct array of arrays as a parameter" to enter a new filter. In my add-on, a new filter is added as posted, with a click on Add Filters From Backup ( To Current Filters ) option ( after right-click on button ) - see my posts above.

2. In my add-on, you no longer need to "careful parsing the actual code to insert correctly" in Filters Manager ( Filters Editor in JustOff's addon ). There is no longer any need to modify the code of a "readymade string" if you want to enter it manually in the Filters Manager - see my posts above.

3. I added an important feature in my add-on: Convert Filter Syntax from Modify HTTP Response 1.3.8 (JustOff) to Intercept & Modify HTTP Response 2.1 (Tellu White) format, with just a few clicks - see my posts above.

***

HELP to Transfer ALL Existing Filters from Modify HTTP Response 1.3.8 (JustOff) add-on to Intercept & Modify HTTP Response 2.1 (Tellu White) add-on:

I will illustrate on the filter used by Modify HTTP Response 1.3.8 (JustOff) to make discourse work in Pale Moon:

https://meta.discourse.org/
01.png
1. Copy the string from "Filters":
02.png
2. Uninstall Modify HTTP Response 1.3.8 (JustOff) add-on, then install my add-on, Intercept & Modify HTTP Response 2.1 (Tellu White).

3. Convert the string with filters ( copied in step 1. ) - right-click on button :
03.png
04.png
05.png
4. Enter converted filters in my add-on - right-click on button :
06.png
07.png
08.png
5. Result:
09.png
6. Test:

https://meta.discourse.org/
10.png
***

7. Insertion of a NEW filter with a few clicks is described here - see the paragraph «I ADDED this SECOND (converted) filter in my add-on»:

https://forum.palemoon.org/viewtopic.php?f=70&t=31829&sid=ad47468c57d2b57aa2eb6e1926987dc2#p257331

***

Download link ( Intercept & Modify HTTP Response 2.1 ):

https://www.mediafire.com/file/z207t2i5x9r4wlb/Intercept_&_Modify_HTTP_Response_2_1.zip/file

User avatar
tellu-white
Fanatic
Fanatic
Posts: 149
Joined: 2022-03-08, 22:02

Re: Request help with http modify response

Unread post by tellu-white » 2024-12-11, 19:22

I did some more tests with Modify HTTP Response 1.3.8 (JustOff) add-on and discovered another problem: it doesn't save filters in Filters Editor if they contain unicode characters.

Test on forum page with "Profile Migration / Übertragung" topic:

https://forum.palemoon.org/viewtopic.php?f=7&t=26149

Filter for testing:

Code: Select all

[["forum.palemoon.org",["/viewtopic.*26149/",["/Übertragung/gi", "!!! REPLACED !!!"]]]]
Screenshots:
01.png
02.png
03.png
04.png
***

I also tested my add-on with filters that contain unicode characters and found that it doesn't work with such filters either. Therefore, I fixed this bug in version 3.0 of my add-on.

Tests on forum pages with the following topics (in German, French and Chinese):

1. Profil Migration / Übertragung
2. [SOLVED] message "Instruction non permise" apres palemoon-32.5.2
3. [CN]是否可以编译 Windows ARM32 架构的 Pale Moon

URLs:

https://forum.palemoon.org/viewtopic.php?f=7&t=26149

https://forum.palemoon.org/viewtopic.php?f=8&t=31748

https://forum.palemoon.org/viewtopic.php?f=11&t=28934

Filter for testing:

Code: Select all

[[`forum.palemoon.org`, `/viewtopic.*26149/`, [`/Übertragung/gi`, `!!! REPLACED !!!`]], [`forum.palemoon.org`, `/viewtopic.*31748/`, [`/Si vous êtes capable d'écrire votre problème en anglais, vous aurez plus de chances de trouver quelqu'un qui puisse vous aider à résoudre ce problème\./gi`, `!!! REPLACED !!!`]], [`forum.palemoon.org`, `/viewtopic.*28934/`, [`/我有一台 Surface RT。它的 IE 和 Edge 都十分让我失望。我觉得 Pale Moon 可能是一个不错的替代品,所以是否有可能编译,而方法是什么/gi`, `!!! REPLACED !!!`]]]
Screenshots:
05.png
06.png
07.png
08.png
09.png
10.png
***

IMPORTANT!

All filters tested before that were posted by other users did work correctly because they did not contain unicode characters.

***

Download link ( Intercept & Modify HTTP Response 3.0 ):

https://www.mediafire.com/file/b51e60yhhrdw423/Intercept_&_Modify_HTTP_Response_3_0.zip/file

User avatar
sidology
Moon lover
Moon lover
Posts: 93
Joined: 2021-12-04, 22:07

Re: Request help with http modify response

Unread post by sidology » 2024-12-11, 21:12

tellu-white wrote:
2024-12-11, 19:22
I did some more tests with Modify HTTP Response 1.3.8 (JustOff) add-on and discovered another problem: it doesn't save filters in Filters Editor if they contain unicode characters.

I also tested my add-on with filters that contain unicode characters and found that it doesn't work with such filters either. Therefore, I fixed this bug in version 3.0 of my add-on.
Thank you for improving your add-on. Maybe someday you will consider publishing it on PM add-on repository.

Post Reply