xul

Toolbar button similar to Back/Forward buttons of firefox - xul

时间秒杀一切 提交于 2019-12-11 12:14:33
问题 I am developing a Firefox addon. I need to create two buttons which exactly looks and operates like back and forward buttons. But the difference is I need to put my own icon inside them. I am completely blank. Any directions will be really helpful. [Edit] I am asking for creating two buttons with the look and feel of back/forward button(Although there are two buttons, it seems like one) in the latest Firefox on windows environment. Thanks. 回答1: It's really easy to add your own Image to

How to dynamically modify CSS rule set (e.g. with a class selector) from JavaScript within Firefox Add-on using XUL, SDK or WebExtensions techniques?

吃可爱长大的小学妹 提交于 2019-12-11 11:53:53
问题 How to dynamically modify CSS rule set (e.g. with a class selector) from JavaScript within Firefox Add-on using XUL, SDK or WebExtensions techniques? Trying to support Firefox 29.0b1 through 49.0a1. Problem I'd like to solve (from within a XUL document within a Firefox add-on, which is sometimes different than a web page): file.xul: (has this line at the top) <?xml-stylesheet href="chrome://{GUID}/skin/text.css" type="text/css"?> text.css: (relevant class within the file) .myTextClass { max

XMLHttpRequest problem

左心房为你撑大大i 提交于 2019-12-11 11:00:55
问题 I am writing one Web Application using XUL. In that Iam using AJAX XMLHttpRequest Object for sending request to server. When I use GPRS connection to send the request to the server from my web application the request is not going, but readyState has changed to 4 and status=0. If the request is not going out how the readyState is Changing. The same Code working fine in local network. If I send the request to server from the browser using GPRS it is working fine. Can any body help me out in

Is it possible to modify a firefox addon written using XUL with an addon written using the Addon SDK

梦想与她 提交于 2019-12-11 07:51:50
问题 I want to write an addon which enhances an existing addon (e.g., adding an options dialog). I do not want to modify the original addon's code directly. The original addon I wish is written using XUL. Does this mean I have to write my addon using XUL as well? Or can I use the newer Addon SDK? Thanks! 回答1: Yes, it is possible to extend other add-ons. There are actually quite a few add-ons that either extend or interact with other add-ons, for example Element Hiding Helper extending Adblock Plus

uncaught exception: Target applet or JVM process exited abruptly - from a firefox extension

天涯浪子 提交于 2019-12-11 07:36:35
问题 I have written a Firefox extension. When a menuitem is selected, it checks for Java version. I am getting this exception, when I try to call a Java class inside JavaScript: uncaught exception: Target applet or JVM process exited abruptly This is happening after I hibernate my system, if I try to use my Firefox extension then I get this error. If I restart Firefox, it works again. What can I do about it? Sample code for Firefox extension ( overlay.xul ): <?xml version="1.0"?> <overlay id=

In XUL or JavaScript, is there a way to move the mouse cursor to specified position?

故事扮演 提交于 2019-12-11 06:36:32
问题 In XUL or JavaScript, is there a way to move the mouse cursor to specified position? 回答1: The only time that Gecko moves the mouse is on Windows for the snap-to-default-button effect. This is used by XUL dialogs and wizards. The backend code doesn't actually check that you're giving it a button; any XUL control works. The mouse is moved to the centre of the element, if that point is on-screen, and the window is active. Normally the code checks that the system cursor snapping is enabled, but

Toolbar context menu showing inside toolbarbutton's xul panel

余生颓废 提交于 2019-12-11 04:54:48
问题 I have a toolbarbutton that when clicked, shows a panel. When i right click the panel i'm getting the following: This is the same context menu that shows when i click on the main toolbar or even the toolbarbuttons. The xul is: <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton id="testToolbarIcon" image="chrome://myext/content/images/aicon.png" type="panel" class="toolbarbutton-1 chromeclass-toolbar-additional"> <panel id="testPanel" type="arrow" level="parent"> <vbox id="testbox"

Change CSS class content from javascript [Firefox/XUL]

≡放荡痞女 提交于 2019-12-11 04:53:00
问题 I'm working on a firefox addon, and relies heavily on some dynamic changes with javascript. There are some UI elements (hbox/descriptions), which are styled using CSS classes. Now I wish to change the a CSS class defintion from javascript, without having to work element id's. Is it possible ? Similar questions had been asked before, but most of them are using php to generate a CSS or jquery based changes. Here's an example for my scenario: My XUL : <box id="firefox-addon-box"> <description id

Firefox: Get mouse coordinates of top-left corner of viewport

旧时模样 提交于 2019-12-11 04:45:48
问题 Good day everyone. I am working on a Firefox extension, and I want to pop up a tooltip at a certain offset from the mouse cursor. However, the problem comes when this offset is out of the viewport. It gets displayed but the user will have to scroll over there. I hope to enhance this by moving the tooltip pop-up within the current viewport. However, a problem arises because the only clue I have to where I am in the document is the mouse-position. A partial solution would be to calculate how

How to react on listitem double click and to add context menu for each listitem?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 04:34:57
问题 I have listbox element in my xul. listitem elements are added there dynamically. How can I: react on double click on each listitem ? implement context menu for each listitem ? During listitem s creation, I know unique id (numeric) of each record added there. Ideally when double click function is called and when context menu item is chosen, I should get this id (and it shouldn't be visible to the user). 回答1: Events bubble which means that you can register your event handler on the <listbox>