xul

Is this a known issue in firefox extensions on Mac OS?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 11:12:37
问题 I've developed a firefox extension which contains a small dialog defined by this XUL script: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="firenowPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Fire.Now" ondialogaccept='onSave();' onload="checkFields();"> <script type="application/x-javascript">function onSave(){ alert('blablabla');}</script> <prefpane id="pane1"> <grid> <rows>

xul:panel position on multiple monitors

人盡茶涼 提交于 2019-12-06 11:01:56
I have a xul:panel on my firefox extension. I give the position to display acording to screen.width and screen.height. My problem appears when I have multiple monitors and I start the browser on the first monitor, it appears on the second one and the xul:panel is drawn according to the first screen's resolution on the second one. Is there a solution to draw according to the second screen's resolution? Background: When I was developing a mutli-monitor application based on XULRunner for work, I found that you just couldn't predict where the window manager would place windows launched after the

clearInterval() is not stopping setInterval() - Firefox Extension Development

吃可爱长大的小学妹 提交于 2019-12-06 10:56:29
问题 I am working on a modification of tamper data that will allow me to send the HTTP request/responses it observes to a server. So far, that functionality has been implemented correctly. The next step is to automate this process, and I wish to use a toolbarmenu button of type 'checkbox' to toggle this functionality on and off. So far I have this bit of code in the .XUL: <toolbarbutton id="tamper.autosend" label="&tamper.toolbar.autosend;" type="checkbox" oncommand="oTamper.toggleTimer();"/> And

Forcing a description widget to wrap

依然范特西╮ 提交于 2019-12-06 06:19:54
I am trying to get a description in a XUL application to wrap, even if it contains long lines. For example, if I save the following as a .xul file and open it in Firefox, it looks fine and wraps appropriately: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="theWindow" title="The Window" style="overflow: auto;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" > <vbox flex="1" style="max-width: 200px; overflow:auto; border: 1px dotted black; padding: 2px;"> <description style="border:

XULRunner: Prevent links to arbitrary domains

别等时光非礼了梦想. 提交于 2019-12-06 05:13:40
suppose, we have a Mozilla Prism like XULRunner app. There is a XUL window with a <browser/> element, where the browser shows a web page on a given domain (say, example.com). Now there are several links on example.com. If a user follows a local link (i.e., stays on example.com) she should be allowed to follow. If on the other hand the link goes to elpmaxe.moc, there should be (I don't mind) any of those two possibilities: The "real" browser opens (just like in Prism), or nothing happens. Any ideas hwo to do this? It is not sufficient to use browser.document.onload or DOMready or such events,

How to place a Xul window as “Always On Top”?

倖福魔咒の 提交于 2019-12-06 04:36:24
I found this file at google code with the function: function SetAlwaysOnTop() { var chkTop = document.getElementById("itmAlwaysOnTop"); var xulWin = window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsIDocShellTreeItem) .treeOwner.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIXULWindow); if(chkTop.getAttribute("checked") == "true") { xulWin.zLevel = xulWin.raisedZ; } else { xulWin.zLevel = xulWin.normalZ; } } The parts of it that I need are just: var xulWin = window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci

How to dynamically set “src” for browser or iframe element (Firefox extension)

流过昼夜 提交于 2019-12-06 04:22:59
问题 I am trying to create a Firefox extension that uses a flex application. I have tried to wrap it in XUL types (<iframe> and <browser>) and I have no preference as to which one I use... whichever works. The problem is that whenever I use a relative path (access through chrome:// or mySWF.html) the flash fails to load. I have a method to search for the absolute path (it's posted below) but I cannot for the life of me figure out a way to dynamically change the src of either an iframe or browser.

In what order do Firefox extensions get initialised?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:57:21
When a user has several Firefox extensions, what decides the order in which they get initialised? Specifically, in which order are XUL overlays applied? In most cases the order is not important, but it does affect things like the order in which items appear on the Tools menu, say, or in the status bar. Furthermore, being able to rely on the knowledge that extension A would be initialised before extension B could sometimes simplify coding. I can't find this covered in any documentation, so any insight would be most welcome. Many thanks. I believe it's in order of installation. At least it used

XUL button doesn't appear

廉价感情. 提交于 2019-12-06 00:18:46
I'm one of the developers of TryAgain , a Firefox add-on, that displays a custom error page when a website fails to load. It essentially replaces Firefox's netError.xhtml with a customized version. However, I've run in to some fairly terminal compatibility problems between 3.0.*-3.6.* and Fx4b5. (An entry in netError.dtd has been renamed, causing a XML parse error in either one version or the other.) To fix this, I've decided to have the extension dynamically modify the page, opposed to replacing it completely. One of the elements I need to add to netError.xhtml in Fx3 is a <xul:button> .

Access the Add-on SDK from within a traditional XUL-based add-on?

这一生的挚爱 提交于 2019-12-05 21:15:34
I have a large and complex XUL-based addon for which I need to use a few functions from the Add-on SDK. Is this possible? If so, does anyone have working sample code, preferably using the page-worker module? The following is the way devtools does it, but certain modules will choke (the obvious candidate being self ). I think you will have better luck with low-level modules. let {Loader} = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}); let loader = new Loader.Loader({ paths: { "": "resource://gre/modules/commonjs/" }, globals: {}, }); let require = Loader.Require(loader, {