Bypass Cloudflare with Firefox Cookies

Dedicated board for extension releases/support threads

Moderators: FranklinDM, Lootyhoof

Forum rules
Please do not create new topics here unless you are an extension author in need of a dedicated releases&support thread!
User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-04-16, 11:05

back2themoon wrote:
2026-04-15, 21:45
The problem here is that the decision whether to change (or not) the browser's UI, should be left to user. Not to extension icons.

I like flexibility too but if any extension can happily break it, then there's no point. So, IMO some sort of hardening against extension icons is needed and ideally a few extra options to play with the Status Bar's height.

I believe the Status Bar not getting affected by "Use Small Icons" is by design, but cannot be 100%. Only Moonchild can answer this stuff.
tellu-white wrote:
2026-04-15, 16:59
I like the fact that the size of the buttons on the "Status Bar" isn't limited by a fixed height of this bar, so I don't like the idea of @Moonchild changing this behavior in the Pale Moon code. Instead, he could add an entry in "about:config" for the option to make the heights of the "add-on bar + status bar" fixed or flexible, depending on users' preferences.
I like it too, but flexible should mean "only allow the user the change it", not "allow any extension icon to break it".
If @Moonchild changes the behavior of the "Status Bar" and "Add-on Bar" without adding an option to avoid this change (as you proposed in a previous comment), then this decision may satisfy you but will displease those who prefer my approach. However, if @Moonchild adopts the solution I proposed (adding an entry in "about:config" so the user can decide), then this solution will not conflict with your proposal if the option you prefer is set as default in "about:config". In that case, you won’t have to do anything to get the solution you want, while I’ll have to change the setting in "about:config".

**********

In my previous comment, I said:
If code is added to the "userChrome.css" file, the height of the "Status Bar" is set by the code added to the bar with the ID "status-bar", but the size of the displayed image for this button ("bypass_cloudflare_with_firefox_cookies_BUTTON.png" 32x32 pixels) is scaled down only by the code added to the bar with the ID "addon-bar"
In fact, the height of the "Status Bar" can be adjusted without targeting the bar with the ID "status-bar" but by adding the same code to the bar with the ID "addon-bar". However, this approach is not a good one because it alters the position of the notifications displayed on "Status Bar".

Screenshots:

1. The position of notification displayed on "Status Bar" after adding the code to set the height of the bar with the ID "status-bar":
01.png
02.png
2. The position of notification displayed on "Status Bar" after adding the code to set the height of the bar with the ID "addon-bar":
03.png
04.png
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-04-18, 18:32

back2themoon wrote :
Please also take a look at the Status Bar situation mentioned here ( https://forum.palemoon.org/viewtopic.ph ... 89#p272052 ). I think it occurs with this extension too.
https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=120#p272156
tellu-white wrote :
As for the add-on "Intercept & Modify HTTP Response" ( https://forum.palemoon.org/viewtopic.php?f=71&t=32889#p272052 ), this add-on has 4 image files for the add-on button (the ones that appear on the Pale Moon toolbar). These images have different colors and are displayed selectively, depending on the add-on's current state. Given this, the fix using the code in the "userChrome.css" file is not feasible. The remaining solution is to add class="toolbarbutton-1" to the code in the "modify_HTTP_response.xul" add-on file and to replace the image files below in the add-on's "content" folder:

modify_HTTP_response_BUTTON_BLUE.png (16x16 pixels)
modify_HTTP_response_BUTTON_GREY.png (16x16 pixels)
modify_HTTP_response_BUTTON_PURPLE.png (16x16 pixels)
modify_HTTP_response_BUTTON_RED.png (16x16 pixels)

modify_HTTP_response_LOGO.png (32x32 pixels)
https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=120#p272255

I like the look of the toolbars with add-on buttons larger than 16x16 pixels, so I didn't change the add-on codes. Instead, I provided alternative solutions. Now I've made new workarounds for both add-ons ("Bypass Cloudflare with Firefox Cookies" and "Intercept & Modify HTTP Response") using JavaScript code instead of CSS code. This approach also works when an add-on changes the button's appearance based on the add-on's current state (see "Intercept & Modify HTTP Response").

userChrome.css

Code: Select all

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

hbox#fullscr-toggler {
    -moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0gQ29weXJpZ2h0IChjKSAyMDE3IEhhZ2dhaSBOdWNoaQpBdmFpbGFibGUgZm9yIHVzZSB1bmRlciB0aGUgTUlUIExpY2Vuc2U6Cmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUCiAtLT4KCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIj4KICAgIDxiaW5kaW5nIGlkPSJqcyI+CiAgICAgICAgPGltcGxlbWVudGF0aW9uPgogICAgICAgICAgICA8Y29uc3RydWN0b3I+PCFbQ0RBVEFbCiAgICAgICAgICAgICAgICBpZih3aW5kb3cudXNlckNocm9tZUpzTW9kKSByZXR1cm47CiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB2YXIgY2hyb21lRmlsZXMgPSBGaWxlVXRpbHMuZ2V0RGlyKCJVQ2hybSIsIFtdKS5kaXJlY3RvcnlFbnRyaWVzOwogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107CiAgICAgICAgICAgICAgICB2YXIgc3NzID0gQ2NbJ0Btb3ppbGxhLm9yZy9jb250ZW50L3N0eWxlLXNoZWV0LXNlcnZpY2U7MSddLmdldFNlcnZpY2UoQ2kubnNJU3R5bGVTaGVldFNlcnZpY2UpOwoKICAgICAgICAgICAgICAgIHdoaWxlKGNocm9tZUZpbGVzLmhhc01vcmVFbGVtZW50cygpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBjaHJvbWVGaWxlcy5nZXROZXh0KCkuUXVlcnlJbnRlcmZhY2UoQ2kubnNJRmlsZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVVUkkgPSBTZXJ2aWNlcy5pby5uZXdGaWxlVVJJKGZpbGUpOwoKICAgICAgICAgICAgICAgICAgICBpZihmaWxlLmlzRmlsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAibm9uZSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC8oXnVzZXJDaHJvbWV8LnVjKS5qcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUvanMiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoLyhedXNlckNocm9tZXwudWMpLnh1bCQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUveHVsIjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC8uYXMuY3NzJC9pLnRlc3QoZmlsZS5sZWFmTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiYWdlbnRzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXig/ISh1c2VyQ2hyb21lfHVzZXJDb250ZW50KS5jc3MkKS4rLmNzcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAhPSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCItLS0tLS0tLS0tXCAiICsgZmlsZS5sZWFmTmFtZSArICIgKCIgKyB0eXBlICsgIikiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAidXNlcmNocm9tZS9qcyIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmljZXMuc2NyaXB0bG9hZGVyLmxvYWRTdWJTY3JpcHRXaXRoT3B0aW9ucyhmaWxlVVJJLnNwZWMsIHt0YXJnZXQ6IHdpbmRvdywgaWdub3JlQ2FjaGU6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2VyY2hyb21lL3h1bCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeHVsRmlsZXMucHVzaChmaWxlVVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGUgPT0gImFnZW50c2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5BR0VOVF9TSEVFVCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3MubG9hZEFuZFJlZ2lzdGVyU2hlZXQoZmlsZVVSSSwgc3NzLkFHRU5UX1NIRUVUKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2Vyc2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5VU0VSX1NIRUVUKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcy5sb2FkQW5kUmVnaXN0ZXJTaGVldChmaWxlVVJJLCBzc3MuVVNFUl9TSEVFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIiMjIyMjIyMjIyMgRVJST1I6ICIgKyBlICsgIiBhdCAiICsgZS5saW5lTnVtYmVyICsgIjoiICsgZS5jb2x1bW5OdW1iZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIi0tLS0tLS0tLS0vICIgKyBmaWxlLmxlYWZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIGxvYWRYVUwoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYoeHVsRmlsZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5sb2FkT3ZlcmxheSh4dWxGaWxlcy5zaGlmdCgpLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb2FkWFVMLCA1KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgXV0+PC9jb25zdHJ1Y3Rvcj4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPg==);
}

bypass_cloudflare_with_firefox_cookies___change_addon_icons.uc.js

Code: Select all

gBrowser.addProgressListener({ onLocationChange: function(){
	var page_URL_for_bypass_cloudflare_with_firefox_cookies = gBrowser.contentDocument.location.href;
	
	if(page_URL_for_bypass_cloudflare_with_firefox_cookies == "about:addons"){
		setTimeout(function(){
			var arr_addons = content.document.getElementsByClassName("addon addon-view");

			if(arr_addons){
				for(var i=0; i<arr_addons.length; i++){
					var addon = arr_addons[i];
					var addon_name = addon.getAttribute("name");
					
					if(addon_name == 'Bypass Cloudflare with "Backup Browser" Cookies'){
						addon._icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAOxAAADsQH1g+1JAAAAB3RJTUUH6QIXBzIx83CeYgAAAv5JREFUWMPtl0tsTFEYx3/n3jvT0tLqhop4BMVi0igWxKtVFvY6nXgkJMSWVILEgiZiJdh4hYhH06pHpRFRwkJFgjTaYjHFQqWN1qMYOmPc81koppOZ67ZmxsaXnNybc7/vnP89///3nXMUKTId8I8FWoCnQDVCs1Fbp/8UZ5A6Gw8UAuXAbRRNOuAv0wG/kSkA8eMuA24AN3XAv0xXJgaSLgCx45cCTShu6YC/PH5F0g0gdp4lwHXgtg74V+jKCgNAuYmeu+r4GKVY6QR4q3o92W+073Y5pgDNwC7LDQClqAJ2Ovk8IpcKt3/0w20RcNUtBTlpoiYnUxpIagkpkA7fKIQtQIMqam9LtzoTSWQJsBu4K0HfpmxTVGYBgDnwzAWOHN1wd8343Gj6KJCgTyVQ6a/3WZNaCo5t7uXAlTJuduSlFICSoO8EUBLXnwdMiXeOREdwqXk5h25Nwo5jpUx9Zq9x7xfybsnnjBSxVgUpVH2OK7DebfpmefqpXNrIjAnz2HNxDl0hT1Lf5xRwUUazQBVQSJ+DBkQUIrhtCk3JtPsc3niNkZYd9524lqhvcLN099PhqffjJz68yqW3/4eOc2yQtx7kJ12ju+jKfkkkbKI/ehwoED1U2fCks5idtdPp+QIwEC8K7BgmtSCiQZtgO2WBYZ0HmT24DsgoRI+Ld47a2TQ+mM/2hnH0284wp0ZgnddkauQPaWjk5FdqGSxpFQ6tlm+R07F970ITOHi1hJMP3W0LE8Oa6jAonFfYUnPf/JTE79W7442NkmB3cf+2s0UjW3qsIZI1/EoYHdiHw5ieqorDxXVDnfzvSrHpbcKw9ikzq9RcHN3f91XZGd0NjQWhPmAHfMvIWe2f2n8AbgG8TdPsn1zllndEXnX487trInbS1F5q4wMOublGYvICkwaVJadSdtSyZ65eKCF1J+mkFs8w5ZLyUo9Fq9l+zk6ahqm6MGPRgSmXlZd65ZVWo7XGdlUHhmNi0YnJexQ9mFzAK/WGRx4bbTWORew76Z4gVbZwCYEAAAAASUVORK5CYII=';
						
						var detail_name = content.document.getElementById("detail-name");

						if(detail_name){
							if(detail_name.innerHTML == 'Bypass Cloudflare with "Backup Browser" Cookies'){
								var detail_icon = content.document.getElementById("detail-icon");
								
								if(detail_icon){
									detail_icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAOxAAADsQH1g+1JAAAAB3RJTUUH6QIXBzIx83CeYgAAAv5JREFUWMPtl0tsTFEYx3/n3jvT0tLqhop4BMVi0igWxKtVFvY6nXgkJMSWVILEgiZiJdh4hYhH06pHpRFRwkJFgjTaYjHFQqWN1qMYOmPc81koppOZ67ZmxsaXnNybc7/vnP89///3nXMUKTId8I8FWoCnQDVCs1Fbp/8UZ5A6Gw8UAuXAbRRNOuAv0wG/kSkA8eMuA24AN3XAv0xXJgaSLgCx45cCTShu6YC/PH5F0g0gdp4lwHXgtg74V+jKCgNAuYmeu+r4GKVY6QR4q3o92W+073Y5pgDNwC7LDQClqAJ2Ovk8IpcKt3/0w20RcNUtBTlpoiYnUxpIagkpkA7fKIQtQIMqam9LtzoTSWQJsBu4K0HfpmxTVGYBgDnwzAWOHN1wd8343Gj6KJCgTyVQ6a/3WZNaCo5t7uXAlTJuduSlFICSoO8EUBLXnwdMiXeOREdwqXk5h25Nwo5jpUx9Zq9x7xfybsnnjBSxVgUpVH2OK7DebfpmefqpXNrIjAnz2HNxDl0hT1Lf5xRwUUazQBVQSJ+DBkQUIrhtCk3JtPsc3niNkZYd9524lqhvcLN099PhqffjJz68yqW3/4eOc2yQtx7kJ12ju+jKfkkkbKI/ehwoED1U2fCks5idtdPp+QIwEC8K7BgmtSCiQZtgO2WBYZ0HmT24DsgoRI+Ld47a2TQ+mM/2hnH0284wp0ZgnddkauQPaWjk5FdqGSxpFQ6tlm+R07F970ITOHi1hJMP3W0LE8Oa6jAonFfYUnPf/JTE79W7442NkmB3cf+2s0UjW3qsIZI1/EoYHdiHw5ieqorDxXVDnfzvSrHpbcKw9ikzq9RcHN3f91XZGd0NjQWhPmAHfMvIWe2f2n8AbgG8TdPsn1zllndEXnX487trInbS1F5q4wMOublGYvICkwaVJadSdtSyZ65eKCF1J+mkFs8w5ZLyUo9Fq9l+zk6ahqm6MGPRgSmXlZd65ZVWo7XGdlUHhmNi0YnJexQ9mFzAK/WGRx4bbTWORew76Z4gVbZwCYEAAAAASUVORK5CYII=';
								}
							}
						}
					}
				}
			}
			
		}, 100);
	}
}});

var observer_for__bypass_cloudflare_with_firefox_cookies__addon_icons = new MutationObserver(function(){
	var button_on_navigator_toolbox = false;
	var btn_bypass_cloudflare_with_firefox_cookies = document.getElementById('btn_bypass_cloudflare_with_firefox_cookies');
	
	if(btn_bypass_cloudflare_with_firefox_cookies){
		btn_bypass_cloudflare_with_firefox_cookies.style.listStyleImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAOxAAADsQH1g+1JAAACZUlEQVQ4y42TTUhUYRiFn/e7d8auaUOiaTnNiPgzJiZURJBQRhtt19YWrVpmENWmXYsg2tYyXBS1iqBJkAoiKJjMRIUkNHEws6ZG/LnO3Dtz7/3a+DNKUGf1bc7DOeflE/6h252H1Y1DbXeBHiD1cDb96lsu9/rO5OTPpUIxMHcarEi91DadNgABWKmuVBmK1j7sFqD5QkP8JNBTb1lDtucNSql5V2UdDccudFbWtPYDZQB1eNKvvhztloVmWYcCATALDG8maIiGuX6lWT0Ybo2i6QNCAFkMljFkR1AFNAIxE6C22uTpvVi8udG5ZkU+ZO+/PL5Z4R8yzfFkkwqZSiUay6rA6evp/OovLu9Xz0ejrBW3M/RfqGZHizUG7AbCQKQmkpWLZ94Sr+7gyfsE35dC66WFR0ETp2SBuNhbAG2vtJeCBdjLMr2JDPM/fjPwJoEf5NGBwYjp0OFDTBslAGepADpUMg5eECb9o5LptEdhLYN2HCgIu8ttDNdDe1tFTJGgX6PLRAdR7eauOgVLjcxEeZyK8m5GUcgvEqwoJCect23qi0CwBTCm5mX07RgjvV27MkHBPzs+d3D0VrKtIZWukBVXEQa6XaG9KOz3wdLbRzQmpn09MeUHC7/1WuuhWOrm0xM/R9PGOS8QxfqyG4C/3hEg72oGku7qx1n/Xba8qgp+8b9SG4+1vGZ8qqgR5YtI8b/cgrMtlygDI1RulUUOVEdiRxTApaKoy7a6tcelb93kI3xC8YKwTm77jTrw8dzVvP9rai6fnQEgXHNY7aloy2DwCWFQwvpZ19zQ9Gd32QEKfwDxlPFrK+oQcgAAAABJRU5ErkJggg==')";

		var navigator_toolbox = document.getElementById("navigator-toolbox");
		
		if(navigator_toolbox){
			var nav_bar = document.getElementById("nav-bar");
			
			if(nav_bar){
				var children = nav_bar.children;
				
				if(children.length > 0){
					for(var i=0; i<children.length; i++){
						var child = children[i];
						
						if(child.nodeName == "toolbarbutton"){
							if(child.id){
								if(child.id == "btn_bypass_cloudflare_with_firefox_cookies"){
									button_on_navigator_toolbox = true;
								}
							}
						}
					}
				}
			}
		}
		
		if(button_on_navigator_toolbox){
			try{
				btn_bypass_cloudflare_with_firefox_cookies.classList.remove("toolbarbutton-1");
				
			} catch(err){}
			
		} else{
			btn_bypass_cloudflare_with_firefox_cookies.classList.add("toolbarbutton-1");
		}
		
		var anonNode = document.getAnonymousNodes(btn_bypass_cloudflare_with_firefox_cookies);
		
		if(anonNode){
			[].forEach.call(anonNode, function(node){
				if(node.nodeName == 'xul:dropmarker'){
					node.style.listStyleImage = "url('data:image/gif;base64,R0lGODlhBQADAKECAAAAAJmZmf///////yH5BAEAAAIALAAAAAAFAAMAAAIGDB5iKdoFADs=')";
				}
			});
		}
	}
});

observer_for__bypass_cloudflare_with_firefox_cookies__addon_icons.observe(document.documentElement, {
	childList: true,
	subtree: true
});

intercept_&_modify_HTTP_response___change_button_icon_size.uc.js

Code: Select all

var observer_for__intercept_and_modify_HTTP_response__change_button_icon_size = new MutationObserver(function(){
	var toolbar_menubar = document.getElementById("toolbar-menubar");
	
	if(toolbar_menubar){
		var btn_modify_HTTP_response = document.getElementById('btn_modify_HTTP_response');
		
		if(btn_modify_HTTP_response){
			btn_modify_HTTP_response.classList.add("toolbarbutton-1");
			
			var children = toolbar_menubar.children;
			
			if(children.length > 0){
				for(var i=0; i<children.length; i++){
					var child = children[i];
					
					if(child.nodeName == "toolbarbutton"){
						if(child.id){
							if(child.id == "btn_modify_HTTP_response"){
								var anonNode = document.getAnonymousNodes(btn_modify_HTTP_response);
								
								if(anonNode){
									[].forEach.call(anonNode, function(node){
										if(node.nodeName == 'xul:image'){
											node.style.height = "16px";
											node.style.padding = "0px 3px 0px 3px";
										}
									});
								}
							}
						}
					}
				}
			}
		}
	}
	
	var navigator_toolbox = document.getElementById("navigator-toolbox");
	
	if(navigator_toolbox){
		var nav_bar = document.getElementById("nav-bar");
		
		if(nav_bar){
			var btn_modify_HTTP_response = document.getElementById('btn_modify_HTTP_response');
			
			if(btn_modify_HTTP_response){
				btn_modify_HTTP_response.classList.add("toolbarbutton-1");
				
				var children = nav_bar.children;
				
				if(children.length > 0){
					for(var i=0; i<children.length; i++){
						var child = children[i];
						
						if(child.nodeName == "toolbarbutton"){
							if(child.id){
								if(child.id == "btn_modify_HTTP_response"){
									var anonNode = document.getAnonymousNodes(btn_modify_HTTP_response);
									
									if(anonNode){
										var iconsize = navigator_toolbox.getAttribute("iconsize");
										
										[].forEach.call(anonNode, function(node){
											if(node.nodeName == 'xul:image'){
												if(iconsize == "small"){
													node.style.height = "16px";
													node.style.padding = "0px 3px 0px 3px";
												}
												
												if(iconsize == "large"){
													node.style.height = "26px";
													node.style.padding = "3px 6px 3px 6px";
												}
											}
										});
									}
								}
							}
						}
					}
				}
			}
		}
	}
	
	var addon_bar = document.getElementById("addon-bar");
	
	if(addon_bar){
		var btn_modify_HTTP_response = document.getElementById('btn_modify_HTTP_response');
		
		if(btn_modify_HTTP_response){
			btn_modify_HTTP_response.classList.add("toolbarbutton-1");
			
			var children = addon_bar.children;
			
			if(children.length > 0){
				for(var i=0; i<children.length; i++){
					var child = children[i];
					
					if(child.nodeName == "toolbarbutton"){
						if(child.id){
							if(child.id == "btn_modify_HTTP_response"){
								var anonNode = document.getAnonymousNodes(btn_modify_HTTP_response);
								
								if(anonNode){
									[].forEach.call(anonNode, function(node){
										if(node.nodeName == 'xul:image'){
											node.style.height = "16px";
											node.style.padding = "0px 3px 0px 3px";
										}
									});
								}
							}
						}
					}
				}
			}
		}
	}
});

observer_for__intercept_and_modify_HTTP_response__change_button_icon_size.observe(document.documentElement, {
	childList: true,
	subtree: true
});

Screenshots:
01.png
02.png
03.png
04.png
05.png
06.png
07.png
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
back2themoon
Knows the dark side
Knows the dark side
Posts: 3220
Joined: 2012-08-19, 20:32

Re: Bypass Cloudflare with Firefox Cookies

Post by back2themoon » 2026-04-18, 21:42

Thanks again tellu-white, although this is getting confusing. You said that the extension will keep affecting the Status Bar.

So, this code: "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js"

...is meant to do exactly what? Change or not change? Keep the Status Bar as-is, or change it? "Change" the icon back to 16x16 from its larger default? I think "change" should mean anything that changes the browser's UI from the usual defaults.

Please consider naming these uc.js files in a more simple, clear way e.g. "standard 16x16 Status Bar icon size" or "larger icon sizes which will increase the Status Bar height". Giving each screenshot a brief description would also help.

About "bypass_cloudflare_with_firefox_cookies___change_addon_icons.uc.js": For that extension, there's the extra uc.js variant for changing the icons themselves (from Firefox-icon to the other one), so I am not sure what exactly this code does now and how it's related to the Status Bar.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-04-19, 15:23

back2themoon wrote:
2026-04-18, 21:42
Thanks again tellu-white, although this is getting confusing. You said that the extension will keep affecting the Status Bar.

So, this code: "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js"

...is meant to do exactly what? Change or not change? Keep the Status Bar as-is, or change it? "Change" the icon back to 16x16 from its larger default? I think "change" should mean anything that changes the browser's UI from the usual defaults.

About "bypass_cloudflare_with_firefox_cookies___change_addon_icons.uc.js": For that extension, there's the extra uc.js variant for changing the icons themselves (from Firefox-icon to the other one), so I am not sure what exactly this code does now and how it's related to the Status Bar.
Both codes in my last post modify the behavior of the buttons for the two add-ons by adding class="toolbarbutton-1", so these buttons no longer change the height of the toolbars they are placed on. These codes do not lock the toolbars' heights, so these can be modified by large images of buttons from other add-ons.

1. In addition to adding class="toolbarbutton-1", the code in "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js" changes the size of whichever button image is currently displayed (out of the 4 images with 4 different colors) by setting the size of the "xul:image" tag to 16x16 pixels.

2. The code in "bypass_cloudflare_with_firefox_cookies___change_addon_icons.uc.js" from my last post replaces the add-on icons with the "base64" codes of the image files (16x16 and 32x32 pixels) used in a previously posted code, so there is no longer a need to copy them into the "chrome" folder. These "base64" codes display 16x16-pixel images on the toolbars, so in this code there is no longer a need to use the "xul:image" tag to limit the dimensions of the displayed images (see above).

**********

If you just want to preserve the height of the "Status Bar" (and not the height of the other bars) as you mentioned here ( https://forum.palemoon.org/viewtopic.php?f=71&t=32889#p272052 ) and to limit the size of the "Status Bar" buttons to 16x16 pixels, use the following code (in "userChrome.css"):

Code: Select all

/***********************************  Status Bar / Addon Bar  ***********************************/

#status-bar{
	max-height: 19px !important;
}

#addon-bar .toolbarbutton-menubutton-dropmarker{
	max-height: 19px !important;
	padding: 2px 3px 0px 2px !important;
}

#addon-bar .toolbarbutton-icon{
	width: 16px !important;
	max-height: 16px !important;
	margin-top: 2px !important;
	margin-bottom: 1px !important;
}

/************************************************************************************************/

Here's what the "Status Bar" looks like on my browser when I use this code:
01.png
And here's what the "Status Bar" looks like without this code:
02.png
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-04-20, 16:09

If you use the file "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js" for the add-on "Intercept & Modify HTTP Response" and at the same time use the "userChrome.css" code from here ( https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=140#p272556 ) to preserve the "Status Bar" height, then you need to make the following modification to the code posted here ( https://forum.palemoon.org/viewtopic.php?f=71&t=32098&start=140#p272518 ) for the file "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js":

On line 108, replace the code:

Code: Select all

node.style.padding = "0px 3px 0px 3px";
with the code:

Code: Select all

node.style.padding = "0px";
Screenshots:
01.png
02.png
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-04-24, 13:31

.
Important !

If you're using a Javascript file with the .uc.js "extension" in the "chrome" folder (such as "intercept_&_modify_HTTP_response___change_button_icon_size.uc.js"), you need to copy the following CSS code into "userChrome.css" file in order for the code in that Javascript file to be activated:

Code: Select all

hbox#fullscr-toggler {
    -moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0gQ29weXJpZ2h0IChjKSAyMDE3IEhhZ2dhaSBOdWNoaQpBdmFpbGFibGUgZm9yIHVzZSB1bmRlciB0aGUgTUlUIExpY2Vuc2U6Cmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUCiAtLT4KCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIj4KICAgIDxiaW5kaW5nIGlkPSJqcyI+CiAgICAgICAgPGltcGxlbWVudGF0aW9uPgogICAgICAgICAgICA8Y29uc3RydWN0b3I+PCFbQ0RBVEFbCiAgICAgICAgICAgICAgICBpZih3aW5kb3cudXNlckNocm9tZUpzTW9kKSByZXR1cm47CiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB2YXIgY2hyb21lRmlsZXMgPSBGaWxlVXRpbHMuZ2V0RGlyKCJVQ2hybSIsIFtdKS5kaXJlY3RvcnlFbnRyaWVzOwogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107CiAgICAgICAgICAgICAgICB2YXIgc3NzID0gQ2NbJ0Btb3ppbGxhLm9yZy9jb250ZW50L3N0eWxlLXNoZWV0LXNlcnZpY2U7MSddLmdldFNlcnZpY2UoQ2kubnNJU3R5bGVTaGVldFNlcnZpY2UpOwoKICAgICAgICAgICAgICAgIHdoaWxlKGNocm9tZUZpbGVzLmhhc01vcmVFbGVtZW50cygpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBjaHJvbWVGaWxlcy5nZXROZXh0KCkuUXVlcnlJbnRlcmZhY2UoQ2kubnNJRmlsZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVVUkkgPSBTZXJ2aWNlcy5pby5uZXdGaWxlVVJJKGZpbGUpOwoKICAgICAgICAgICAgICAgICAgICBpZihmaWxlLmlzRmlsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAibm9uZSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC8oXnVzZXJDaHJvbWV8LnVjKS5qcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUvanMiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoLyhedXNlckNocm9tZXwudWMpLnh1bCQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUveHVsIjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC8uYXMuY3NzJC9pLnRlc3QoZmlsZS5sZWFmTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiYWdlbnRzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXig/ISh1c2VyQ2hyb21lfHVzZXJDb250ZW50KS5jc3MkKS4rLmNzcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAhPSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCItLS0tLS0tLS0tXCAiICsgZmlsZS5sZWFmTmFtZSArICIgKCIgKyB0eXBlICsgIikiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAidXNlcmNocm9tZS9qcyIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmljZXMuc2NyaXB0bG9hZGVyLmxvYWRTdWJTY3JpcHRXaXRoT3B0aW9ucyhmaWxlVVJJLnNwZWMsIHt0YXJnZXQ6IHdpbmRvdywgaWdub3JlQ2FjaGU6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2VyY2hyb21lL3h1bCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeHVsRmlsZXMucHVzaChmaWxlVVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGUgPT0gImFnZW50c2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5BR0VOVF9TSEVFVCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3MubG9hZEFuZFJlZ2lzdGVyU2hlZXQoZmlsZVVSSSwgc3NzLkFHRU5UX1NIRUVUKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2Vyc2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5VU0VSX1NIRUVUKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcy5sb2FkQW5kUmVnaXN0ZXJTaGVldChmaWxlVVJJLCBzc3MuVVNFUl9TSEVFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIiMjIyMjIyMjIyMgRVJST1I6ICIgKyBlICsgIiBhdCAiICsgZS5saW5lTnVtYmVyICsgIjoiICsgZS5jb2x1bW5OdW1iZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIi0tLS0tLS0tLS0vICIgKyBmaWxlLmxlYWZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIGxvYWRYVUwoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYoeHVsRmlsZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5sb2FkT3ZlcmxheSh4dWxGaWxlcy5zaGlmdCgpLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb2FkWFVMLCA1KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgXV0+PC9jb25zdHJ1Y3Rvcj4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPg==);
}


Example:
01.png
02.png
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-05-08, 13:20

I've made a new version of this add-on (version 9.0) in which I added an Context Menu to the Bookmarks and History items (which can be accessed by right-clicking a Bookmark or History item), option that can be used to directly open - in a new tab - a page (a URL) that requires Cloudflare verification (without having to copy the URL). This option only works if cookies have already been saved for that page / that "host". I've added a "checkbox" to the add-on's initialization panel that lets you choose whether to show or hide the "Bypass Cloudflare with Backup Browser Cookies" entry in Bookmarks and History items Context Menu.

Screenshots:
01.png
02.png
03.png
04.png
05.png
06.png
07.png
08.png
09.png

Download link ( Bypass Cloudflare with Firefox Cookies 9.0 ):

https://www.mediafire.com/file/g6q3ktsn8z6tpkr/bypass_cloudflare_with_firefox_cookies_9_0.zip/file
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
back2themoon
Knows the dark side
Knows the dark side
Posts: 3220
Joined: 2012-08-19, 20:32

Re: Bypass Cloudflare with Firefox Cookies

Post by back2themoon » 2026-05-08, 13:48

Thanks for the update, tellu-white.

I am a bit confused. If it "only works if cookies have already been saved for that page", then what is the difference between using this new entry and just opening the link directly? Shouldn't it open with no CF check anyway, since those cookies are already present?

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-05-08, 15:37

back2themoon wrote:
2026-05-08, 13:48
Thanks for the update, tellu-white.

I am a bit confused. If it "only works if cookies have already been saved for that page", then what is the difference between using this new entry and just opening the link directly? Shouldn't it open with no CF check anyway, since those cookies are already present?
You're welcome, back2themoon.

Screenshots:
01.png
02.png
03.png
04.png
05.png
06.png
07.png
08.png
09.png

**********

Edit:

I should have mentioned that this add-on is required if Cloudflare check doesn't work in Pale Moon. In that case, a page that uses Cloudflare check cannot be opened directly from a link. When the user encounters such a page for the first time, he/she has not yet picked up the cookies from Firefox, which is why I said in the previous comment that "this option only works if cookies have already been saved for that page / that host."

Also, cookies can be deleted from Pale Moon (from "prefs.js") by the user, or they will expire after a certain amount of time. In these situations as well, the procedure for copying cookies from Firefox must be repeated (after successfully passing the new Cloudflare verification in Firefox).
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-05-09, 13:19

back2themoon wrote:
2026-05-08, 13:48
Thanks for the update, tellu-white.

I am a bit confused. If it "only works if cookies have already been saved for that page", then what is the difference between using this new entry and just opening the link directly? Shouldn't it open with no CF check anyway, since those cookies are already present?
I think I might have missed your point in my reply from yesterday. Today I remembered that you mentioned in another post that you "always maintain cookies for CF-protected websites for smooth operation":
01.png
https://forum.palemoon.org/viewtopic.php?f=3&t=32045&start=860#p272898

On the other hand, I have a Custom Button that deletes cookies every time I close a tab. The new option of this add-on ("Add a Context to Bookmarks & History Items") is useful precisely for users who frequently delete cookies and thus can no longer open pages that use "Cloudflare check" directly from a link in the Bookmarks or History panels.
You do not have the required permissions to view the files attached to this post.
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.

User avatar
tellu-white
Lunatic
Lunatic
Posts: 338
Joined: 2022-03-08, 22:02
Location: Arad, Romania

Re: Bypass Cloudflare with Firefox Cookies

Post by tellu-white » 2026-05-12, 22:28

Version 9.1 with corrections regarding "HTTP Observer".

Download link ( Bypass Cloudflare with Firefox Cookies 9.1 ):

https://www.mediafire.com/file/hzywflmmrcl5x2v/bypass_cloudflare_with_firefox_cookies_9_1.zip/file
Telu (with a single L) was the name of the dog of one of my grandparents - when I was just a little boy.
He was a white dog of large size and very friendly.