How can I inspect popup menuitem's?

Discuss application theming and theme development.
Post Reply
User avatar
jez
Posts: 123
Joined: October 16th, 2003, 1:20 am

How can I inspect popup menuitem's?

Post by jez »

I'd like to inspect the menuitem elements that appear for a popup menu (in this case, "list all tabs") in DOM Inspector. I can see them appear in the DOM when I click and get the popup but of course they disappear when I click on the DOM Inspector as the popup disappears. Is there a way I can inspect the popup items?
== Jez ==
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How can I inspect popup menuitem's?

Post by smsmith »

In the DOM Inspector, use File -> Inspect Chrome Document -> Select an open window/tab.

Scroll down, expand ID main-window. Scroll down, expand ID mainPopupSet. You should be able to find the menu from there.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How can I inspect popup menuitem's?

Post by patrickjdempsey »

There used to be an extension called PopupInspector on AMO... but it's gone. Not sure where it went. But for themeing, you don't really need to inspect too much, all of the code should be in popup.css and menu.css.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
mcdavis
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Re: How can I inspect popup menuitem's?

Post by mcdavis »

patrickjdempsey wrote:There used to be an extension called PopupInspector on AMO... but it's gone. Not sure where it went.


I wonder what that's about? https://addons.mozilla.org/en-US/firefo ... inspector/

Anyhow, I have version 0.1 of it, from 2011/05/24; let me know anyone if you want to get it to take a look for yourself. (I'm sure other people have it, too.)
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How can I inspect popup menuitem's?

Post by patrickjdempsey »

I think one of the updates may have borked it... I seem to remember it not working on certain menus anymore. Maybe the developer just gave up on trying to fix it?
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
mcdavis
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Re: How can I inspect popup menuitem's?

Post by mcdavis »

I just tried it, it only kind-of works. If you shift-right-click on the site identity popup it opens DOM Inspector to that, but if you do that on the click-to-play popup it opens DOM Inspector to an empty document, apparently because the popup gets destroyed when it's closed.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: How can I inspect popup menuitem's?

Post by Zoolcar9 »

If the menupopup has onpopupshowing and onpopuphiding/onpopuphidden attributes,
use DOMI to move onpopuphiding/onpopuphidden value to the start of onpopupshowing value.

For example

Code: Select all

onpopupshowing="create()"
onpopuphiding="destroy()"

becomes

Code: Select all

onpopupshowing="destroy(); create()"
onpopuphiding=""
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
Post Reply