

- Gbrowser addeventlistener install#
- Gbrowser addeventlistener code#
- Gbrowser addeventlistener windows#
If (event.button = 2 & !event.altKey & !event.ctrlKey & !event.shiftKey) If (event.button = 1 & !event.altKey & !event.ctrlKey & !event.shiftKey) If (event.button = 0 & !event.altKey & !event.ctrlKey & !event.shiftKey) right click button and shift - open custom button context popup Web browsers nowadays do not allow the use of modifier keys ( Alt, Ctrl, etc.) in conjunction with the middle mouse button. Var cbu = custombuttonsUtils Using Mouse HandlersĪll middle click events with modifiers are "broken". Var _id = this.id // The id of the button. Var xhtmlns = "" // Namespace for HTML elements inside XUL elements. Var xulns = "" // Namespace for XUL elements. Var self = this // "this" is the button itself.
Gbrowser addeventlistener windows#
Save size and position of editor windows separately for each custom buttonĬommand Line Parameter firefox.exe -custombuttons disable-buttons-initialization seamonkey.exe -custombuttons disable-buttons-initialization thunderbird.exe -custombuttons disable-buttons-initialization sunbird.exe -custombuttons disable-buttons-initialization kompozer.exe -custombuttons disable-buttons-initialization flock.exe -custombuttons disable-buttons-initialization Predefined Global Variables var Cc = Components.classes
Gbrowser addeventlistener install#
Open replace dialog in backward direction.Įnable install buttons from mail messages

Open replace dialog in forward direction.

Open search dialog in backward direction. Hidden unless clipboard has a button URL.
Gbrowser addeventlistener code#
To attach to the unload event in above example you can use the "pagehide" event like this: appcontent.addEventListener("pagehide", myExtension.onPageUnload, false) įor appcontent and similarly for messagepane messagepane.addEventListener("pagehide", myExtension.onPageUnload, false) Īnd add your code to onPageUnload method.How to use this feature without losing your mindĮvery time you press the "Edit external." button to edit a button, a temporary file is created inside your profile folder (inside a folder called Temp_ExternalEditor) and opened with the text editor of your choice. If you are running code on a page load it is likely you would want to run some cleanup code on page unload. If you only want to handle documents, ensure = "#document". Creating an overlayįirst, you need to create an overlay to one (or more, depending on which applications you target) of the following XUL documents: ApplicationĪttach a script to your overlay (see "Attaching a Script to an Overlay") that adds a load event listener to appcontent element (browsers) or messagepane (mail): window.addEventListener("load", function load(event), true) Ĭurrent Firefox trunk nightlies will fire the onPageLoad function for not only documents, but xul:images (favicons in tabbrowser). Progress listeners implement the nsIWebProgressListener interface. Progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events. If you need finer control over custom code execution-for example, as documents are loading or when tabs are switched-see Progress Listeners. This article is for XUL/ JavaScript developers who want to have custom code executed each time a new page is loaded in browser/mail.
