MozillaZine

How do we get DOM info for userChrome in 57+

Discussion about official Mozilla Firefox builds
xichael

User avatar
 
Posts: 103
Joined: May 28th, 2006, 6:10 pm

Post Posted October 21st, 2017, 9:22 pm

Since DOM Inspector is currently defunct, what other tools are available to find IDs and Classes for editing userChrome.css?

Currently, my goal is to remove these top few items from the bookmark menu, if anyone has the code handy:

Image

morat
 
Posts: 2502
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 22nd, 2017, 12:18 am

Browser Toolbox
http://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox

Browser Toolbox - Debugging popups
http://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox#Debugging_popups

Try picking a menuitem in a menupopup using the following buttons.

* Disable popup auto hide
* Pick an element from the page

Code: Select all
/* Firefox userChrome.css */

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

#BMB_viewBookmarksSidebar,
#BMB_bookmarksShowAllTop,
#BMB_bookmarksShowAllTop + menuseparator,
#BMB_bookmarksToolbar {
  display: none !important;
}
Last edited by morat on October 22nd, 2017, 12:55 pm, edited 1 time in total.

Brummelchen
 
Posts: 2748
Joined: March 19th, 2005, 10:51 am

Post Posted October 22nd, 2017, 1:43 am

and how to work on webextension popups?
i only get the photon popup code but no content.
and there exist no "Inspect Element" on the popup.

morat
 
Posts: 2502
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 22nd, 2017, 5:48 am

@Brummelchen

Try something like:

* open about:debugging
* left click debug button for uBlock Origin
* select a normal tab like forums.mozillazine.org
* Disable popup auto hide
* left click uBlock Origin button to open popup
* Select an iframe as the currently targeted document
* select popup.html file
* Pick an element from the page
* left click eye dropper icon or enter element picker mode icon

Debugging
http://developer.mozilla.org/en-US/Add-ons/WebExtensions/Debugging

Code: Select all
/* Firefox userContent.css */

@-moz-document regexp("moz-extension://.*/popup.html") {
  html[id="uBO-popup-panel"] span[id="gotoPick"] {
    background-color: orange !important;
  }
}
Last edited by morat on October 22nd, 2017, 8:55 am, edited 1 time in total.

Brummelchen
 
Posts: 2748
Joined: March 19th, 2005, 10:51 am

Post Posted October 22nd, 2017, 7:55 am

i saw this before but i had no idea about - lack of developer knowledge ;)

nah, could not manage it with uB picker. and no code for me. next time, currently occupied with another object. but i had saved the popup to investigate. i have an upcoming idea.

thank you.

xichael

User avatar
 
Posts: 103
Joined: May 28th, 2006, 6:10 pm

Post Posted October 22nd, 2017, 6:46 pm

Thanks! This is so much better than DOM Inspector!

Here's what I got, by the way:

Code: Select all
#BMB_viewBookmarksSidebar,
#BMB_bookmarksShowAllTop,
#BMB_bookmarksShowAllTop + menuseparator,
#BMB_bookmarksToolbar {
    display: none !important;
}

morat
 
Posts: 2502
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 22nd, 2017, 10:40 pm

You're welcome.

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 4 guests