How to change menu text?

User Help for Mozilla Firefox
Post Reply
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

How to change menu text?

Post by semigeek »

In the bookmark context menu, longstanding entries "Properties" and "Delete" have been replaced by "Edit bookmark" and "Remove bookmark". After all those years my eye still scans for "Delete" (which remains in the History context menu!) making it hard to recognize "Remove". I know how to get rid of an entry with css, but is there a way to replace it with new text, "Delete"?
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: How to change menu text?

Post by morat »

I see the "Delete Bookmark" label in Firefox 104.0.2.

Try something like:

Code: Select all

#placesContext_deleteBookmark > label { display: none !important; }
#placesContext_deleteBookmark::after { content: "Delete"; }
CSS Content
http://css-tricks.com/css-content/

The id for the "Edit Bookmark…" label is "placesContext_show_bookmark:info", oddly. I don't know if the ":info" in the id mucks up the css selector.

Handling a colon
http://stackoverflow.com/questions/122238

Reference
http://searchfox.org/mozilla-esr102/sea ... w_bookmark
http://searchfox.org/mozilla-esr102/sea ... t-bookmark
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: How to change menu text?

Post by semigeek »

Thanks morat, that code did the trick. I suspected I needed "after/before" and "content" but am not confident about putting that together. (I just upgraded to 91.13; glad to know this goof has been fixed down the road. I actually think "Edit bookmark" is an improvement on "Properties" and will leave it alone.)

Oddly enough, I had just run into the colon issue (":info") elsewhere, it seems to be occurring in some newer items. I right-clicked something like this in the Toolbox to get its selector, which had a backslash (escape) inserted before the colon, and that worked in userChrome.css.
(Ah, found it: #placesContext_open\:newtab, #placesContext_open\:newwindow, #placesContext_open\:newprivatewindow)
lenny2
Posts: 68
Joined: June 8th, 2022, 3:10 am

Re: How to change menu text?

Post by lenny2 »

semigeek wrote:After all those years my eye still scans for "Delete" (which remains in the History context menu!) making it hard to recognize "Remove".
I was experiencing the same problem, so I made it in color.

Code: Select all

/* userChrome.css Firefox Tweak */
/* Colored_Delete-Show_Bookmark-Folder_items_context_menu.css */
#placesContext_show_folder\:info {
    color: yellow !important; /* color of the text for "Change folder..." */
}
#placesContext_deleteFolder {
    color: red !important; /* color of the text for "Delete Folder" */
}
#placesContext_show_bookmark\:info {
    color: yellow !important; /* color of the text for "Change Bookmark..." */
}
#placesContext_deleteBookmark {
    color: red !important; /* color of the text for "Delete Bookmark" */
}
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: How to change menu text?

Post by morat »

There are more ids with colons than I thought.

Reference
http://searchfox.org/mozilla-release/se ... egexp=true
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: How to change menu text?

Post by semigeek »

lenny2 wrote:I was experiencing the same problem, so I made it in color.
Yes, I too had made the "Remove" entries red to catch my eye. (Your code suggests there have been further modifications now, to "Change bookmark/folder" etc... how can anyone imagine this is helpful? Can I turn it into a rabbit?)
Post Reply