Skip to content

Message Filters Toolbar Implementation - insert above filterHeader (not any 1st hbox) #265

@WoofGrrrr

Description

@WoofGrrrr

I am using the userChromeJS extension to run my userChrome.js script. The userChromeJS extension causes this script to run
when one of a selected list of windows is opened. I have modified the extension to add the "Message Filters" window to this list.

One of the things my userChrome.js script does to is replace the System Title Bar on the Message Filters window with my own
title bar implementation, much the same as how "Tools -> Settings -> General -> Language & Appearance -> Hide system window titlebar" works.

In my script, I use code like the following to place a XUL <vbox> element as the first element of the <body> element

  const body = document.body
  const titleBarVbox = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "vbox");
  titleBarVbox.style.appearance = "none";
  body.insertBefore(titleBarVbox, body.firstChild);

It then adds other elements as descendants of this <vbox>

The quickFilters tool bar is appearing ABOVE what my code is adding. I want my title bar to be at the very top.

In fact, the quickFilters tool bar is added as the FIRST CHILD of my <vbox>.

From the Thunderbird Developer Toolbox:

  <html:body xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <vbox style="appearance: none;">
      <toolbox id="quickfilters-toolbox" insertbefore="status-bar" tooltip="quickFiltersToolTip" wlapi_autoinjected="AddOnNS15">
      .
      .
      .
    <//vbox>
    <hbox id="filterHeader" align="center">

Could you please add it BEFORE this element instead:

  <hbox id="filterHeader" align="center">

I would do it in my userChrome.js script, but the script is not finding an element with ID "quickfilters-toolbox". It looks like userChrome.js is being called before the quickFilters code is invoked???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions