back2themoon wrote: ↑2026-04-10, 15:26
tellu-white wrote: ↑2026-04-10, 14:50
Perhaps I should release a new version of the add-on to correct this oversight.
In this case, please also take a look at the Status Bar situation
mentioned here. I think it occurs with this extension too.
As I mentioned in my previous post, the issue with the "Status Bar" height involves several factors to consider.
If I add
class="toolbarbutton-1" to the add-on button, the height of the "Status Bar" no longer changes (if you use an 16x16 pixels image for "bypass_cloudflare_with_firefox_cookies_BUTTON.png" file). However,
I don't like this solution because the button's appearance changes depending on the bar it's placed on ("Status Bar", "Menu Bar", "Navigation Toolbar"). I'll post some screenshots comparing two add-ons:
1. The "Grabit" add-on developed by RealityRipple, which uses
class="toolbarbutton-1" for the add-on button.
2. My add-on "Bypass Cloudflare with Backup Browser Cookies", which does not use this class for the add-on button.
Screenshots:
1. The "Grabit" add-on:
01.png
02.png
03.png
04.png
05.png
2. My "Bypass Cloudflare with Backup Browser Cookies" add-on:
06.png
07.png
08.png
Considering this,
I won't be adding class="toolbarbutton-1" to my add-on, but I'll present two solutions from which you can choose to maintain the "Status Bar" height.
1. You can modify the add-on's code as follows:
Code snippet from the original "bypass_cloudflare_with_firefox_cookies.xul" file in the add-on's "content" folder:
Code: Select all
<toolbarbutton
type='menu-button'
id="btn_bypass_cloudflare_with_firefox_cookies"
label='Bypass Cloudflare with "Backup Browser" Cookies'
The same code snippet with the addition of
class="toolbarbutton-1":
Code: Select all
<toolbarbutton
type='menu-button'
id="btn_bypass_cloudflare_with_firefox_cookies"
class="toolbarbutton-1"
label='Bypass Cloudflare with "Backup Browser" Cookies'
If you use this option, you have two choices:
A. Replace the image files below in the add-on's "content" folder:
bypass_cloudflare_with_firefox_cookies_BUTTON.png (16x16 pixels)
bypass_cloudflare_with_firefox_cookies_LOGO.png (32x32 pixels)
In this case, don't keep these image files in the "chrome" folder and use the following code in the "userChrome.css" file (only if you want to preserve the same image for the "down arrow" in all three bars mentioned above):
Code: Select all
/*********************** "Bypass Cloudflare with Firefox Cookies" Icon ************************/
#addon-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-icon{
margin-right: 0px !important;
padding: 2px 5px 2px 3px !important;
border-right: none !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
margin: 0px !important;
padding: 0px !important;
border-left: none !important;
}
#toolbar-menubar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
}
/************************************************************************************************/
If you use the code above, you also need to copy the "arrow-dn.gif" file into the "chrome" folder:
arrow-dn.zip
B. If you don't replace the image files in the add-on's "content" folder, you must keep the image files of the add-on button in the "chrome" folder and use the following code in "userChrome.css":
Code: Select all
/*********************** "Bypass Cloudflare with Firefox Cookies" Icon ************************/
#addon-bar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
-moz-box-orient: horizontal !important;
}
#addon-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
-moz-box-orient: horizontal !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-icon{
margin-right: 0px !important;
padding: 2px 5px 2px 3px !important;
border-right: none !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
margin: 0px !important;
padding: 0px !important;
border-left: none !important;
}
#toolbar-menubar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
-moz-box-orient: horizontal !important;
}
#toolbar-menubar #btn_bypass_cloudflare_with_firefox_cookies .toolbarbutton-menubutton-dropmarker {
list-style-image: url("arrow-dn.gif") !important;
}
/************************************************************************************************/
You also need to copy the "arrow-dn.gif" file into the "chrome" folder.
**********
2. The second option is more simple, but it keeps the "Status Bar" height fixed (it isn't fixed in the Pale Moon code - which is why my add-on can change it). If you choose this option, 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: 0px 2px 0px 1px !important;
}
#addon-bar .toolbarbutton-icon{
width: 16px !important;
max-height: 16px !important;
}
/************************************************************************************************/
/*********************** "Bypass Cloudflare with Firefox Cookies" Icon ************************/
#addon-bar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
}
#nav-bar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
}
#toolbar-menubar #btn_bypass_cloudflare_with_firefox_cookies {
list-style-image: url("bypass_cloudflare_with_firefox_cookies_BUTTON.png") !important;
}
/************************************************************************************************/
In this case, you'll need to keep in the "chrome" folder the files:
bypass_cloudflare_with_firefox_cookies_BUTTON.png (16x16 pixels)
bypass_cloudflare_with_firefox_cookies_LOGO.png (32x32 pixels)
The file "bypass_cloudflare_with_firefox_cookies_BUTTON.png" you're using is 17x17 pixels, so you'll need to resize it to 16x16 pixels.
This is what the button for my add-on "Bypass Cloudflare with Backup Browser Cookies" looks like in version 2:
09.png
***************************************
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)
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.