MozillaZine

How can I inspect popup menuitem's?

Discuss application theming and theme development.
jez

User avatar
 
Posts: 119
Joined: October 16th, 2003, 1:20 am

Post Posted August 20th, 2013, 3:17 am

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 ==

smsmith
Moderator

User avatar
 
Posts: 19778
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post Posted August 20th, 2013, 8:28 pm

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.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted August 26th, 2013, 6:31 pm

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/

mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted August 28th, 2013, 11:30 am

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

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted August 28th, 2013, 2:07 pm

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/

mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted August 28th, 2013, 10:02 pm

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

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted August 31st, 2013, 12:11 pm

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."

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 1 guest