how to change the default bookmark icon using userChrome.css

User Help for Mozilla Firefox
wanderer942
Posts: 6
Joined: August 8th, 2017, 4:09 pm

how to change the default bookmark icon using userChrome.css

Post by wanderer942 »

using userChrome.css under FF 55, how do I change the default bookmark icon in the menu, toolbar, and "show all bookmarks" windows?

the following seemed to work until v55:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#tabbrowser-tabs .tab-icon-image:not(src),
.sidebar-placesTreechildren::-moz-tree-image(leaf),
.bookmark-item:not(src):not([container]):not([type]):not([folder]){
list-style-image: url("net45.ico") !important;
}

#.bookmark-item:not([container]) {
list-style-image:url("net45.ico")!important;}

treechildren::-moz-tree-image(leaf) {
list-style-image:url("net45.ico")!important;-moz-image-region:auto!important; }


Thanks in advance for any tips.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: how to change the default bookmark icon using userChrome

Post by Brummelchen »

no path to ico - or replace it with base64 coded data (recommended).
User avatar
LIMPET235
Moderator
Posts: 39936
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: how to change the default bookmark icon using userChrome

Post by LIMPET235 »

Moving this to Firefox Support...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
NorthPole
Posts: 2
Joined: September 2nd, 2017, 5:38 am

Re: how to change the default bookmark icon using userChrome

Post by NorthPole »

Interested to read this, as I have exactly the same problem following the upgrade to FF 55.

Two comments:

1) assuming the replacement icon is also in the current User's chrome folder, I would not have thought an image path was required in the userChrome.css file;

2) using Base 64 coding for the icon has no effect - the default icon still shows up.

It's almost as though FF 55 is ignoring userChrome.css altogether.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: how to change the default bookmark icon using userChrome

Post by Brummelchen »

it should work. add "agent sheet" like here
http://forums.mozillazine.org/viewtopic ... #p14764409

i dropped userchrome long ago because it is not convenient and need restarts i cannot perform all the time while i need it to work.

i am also not sure if ICO is possible - try PNG.
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: how to change the default bookmark icon using userChrome

Post by Frank Lion »

NorthPole wrote:1) assuming the replacement icon is also in the current User's chrome folder, I would not have thought an image path was required in the userChrome.css file;
That's right.

NorthPole wrote:It's almost as though FF 55 is ignoring userChrome.css altogether.
Nope, I've done userChrome.css stuff in Firefox 57 and it works fine.

The way to fix this one is to get the DOM Inspector extension on it and see what's going on.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
L.A.R. Grizzly
Posts: 5396
Joined: March 15th, 2005, 5:32 pm
Location: Upstate Ohio, USA
Contact:

Re: how to change the default bookmark icon using userChrome

Post by L.A.R. Grizzly »

NorthPole wrote:1) assuming the replacement icon is also in the current User's chrome folder, I would not have thought an image path was required in the userChrome.css file;
Be sure to use forward slashes in the icon path instead of backward slashes. I would suggest using a .png file as well.

I have changed the default bookmark folder icons in SM to match the ones in FX. Below is a sample of my path to the icon file (notice the forward slashes):

Code: Select all

("file:///c:/Users/Grizzly/AppData/Roaming/Mozilla/SeaMonkey/Profiles/vakv7llq.default/userstyles/bookmarkfolder.png")
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.0.2, Epyrus Mail 2.1.2, Firefox 115.8.0esr, Thunderbird 115.8.1, and SeaMonkey 2.53.18
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: how to change the default bookmark icon using userChrome

Post by Frank Lion »

L.A.R. Grizzly wrote:
NorthPole wrote:1) assuming the replacement icon is also in the current User's chrome folder, I would not have thought an image path was required in the userChrome.css file;
Be sure to use forward slashes in the icon path instead of backward slashes. I would suggest using a .png file as well.
No slashes in either direction are needed. You just put the required image in the profile's chrome folder and link to it in userChrome.css in this format -

Code: Select all

list-style-image: url("net45.png") !important;
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
NorthPole
Posts: 2
Joined: September 2nd, 2017, 5:38 am

Re: how to change the default bookmark icon using userChrome

Post by NorthPole »

In response to comments:

1) I am using a PNG as an alternative icon (I don't believe I mentioned an ICO file);

2) my userChrome.css file already uses the code quoted in Frank Lion's post.
wanderer942
Posts: 6
Joined: August 8th, 2017, 4:09 pm

Re: how to change the default bookmark icon using userChrome

Post by wanderer942 »

I tried upgrading to FF 56 and this issue still affects me. It's really annoying to have to use an older version. I am stuck on 54.0.1. Perhaps someone could PLEASE submit a bug on this. I, too, have already tried PNG files and !important. The new icons still override my overrides. Thanks
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: how to change the default bookmark icon using userChrome

Post by Frank Lion »

wanderer942 wrote: Perhaps someone could PLEASE submit a bug on this.
A bug to who? To Mozilla saying your departures from their defaults are not working?

Good luck with that one. :P
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
atlanto
Posts: 97
Joined: March 7th, 2015, 4:19 pm
Location: Japan

Re: how to change the default bookmark icon using userChrome

Post by atlanto »

I'm using chrome.manifest hacking.
>override chrome://mozapps/skin/places/defaultFavicon.svg myIcon.png
(chrome.manifest is in firefox installation directory)
(I don't recommend this since it is not for end-users. Also, chrome.manifest will be reset on every "update", so you will need to do this again.)

https://developer.mozilla.org/en-US/doc ... gistration
https://bugzilla.mozilla.org/show_bug.cgi?id=1356435
wanderer942
Posts: 6
Joined: August 8th, 2017, 4:09 pm

Re: how to change the default bookmark icon using userChrome

Post by wanderer942 »

Frank Lion wrote:
wanderer942 wrote: Perhaps someone could PLEASE submit a bug on this.
A bug to who? To Mozilla saying your departures from their defaults are not working?

Good luck with that one. :P
userChrome.css is not a departure from defaults. it's supposed to be workable.
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Re: how to change the default bookmark icon using userChrome

Post by malliz »

Read things properly and try not to answer every question with an attack
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: how to change the default bookmark icon using userChrome

Post by dickvl »

Current releases seem to use an image attribute in tab.tabbrowser-tab to set the favicon and have an inherit attribute for .tab-icon-image (xbl:inherits="src=image").
This seems to prevent using userChrome.css to override the favicon (you would have to set the src attribute).
Post Reply