xul

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

你说的曾经没有我的故事 提交于 2019-12-04 11:28:19
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. <script type="text/javascript"> function loadSWF() { alert("loadSWF!"); var fullPath = "file:///" +

Signing XUL-based add-on for Firefox

旧街凉风 提交于 2019-12-04 05:35:39
问题 Is it possible to sign an add-on based on XUL for Firefox, or signing only possible with the new SDK? 回答1: All extensions, be they Overlay, Restartless/Bootstrapped, Add-on SDK, or the new WebExtensions API based extensions, can be signed. It used to be that individual extension authors could choose to sign their extension themselves. As of some time ago, Mozilla changed their policy to be that all extensions must be submitted to AMO and signed by Mozilla. Specifically, they say: Mozilla will

What is the proper way to get bounding box for HTML elements relative to the Window?

笑着哭i 提交于 2019-12-04 04:58:06
I'm writing a Firefox extension. I'm trying to limit it to just XUL+Javascript (no XPCOM). When I get a mouseover event for an HTML element, I need to get its bounding box in the windows coordinate system (that is the built-in XUL document browser.xul). The obvious place to start is to put something like this in the mouseover event handler: var rect = e.target.getBoundingClientRect(); Which is great, but that gives me the rect in the HTML document's coordinate system, which is relative to the upper left corner of the HTML drawing area. I want to display a xul:panel element using panel

How to get text from Address Bar in Firefox extension

自作多情 提交于 2019-12-04 02:42:34
I am building a Firefox Extension . I am using XUL and Javascript to do this. I need to get the text from my Firefox browser's address bar. Please don't get confused with URL where the browser has navigated, its just the text that user enters before the page redirects. Suppose user is at http://www.myexample.com or whatever page. Now he types Cricket in the Address Bar and as soon as he hits enter, I want to capture the text ("Cricket") from the address bar . I need this data to do some processing further in my code. Marcel Korpel It doesn't seem to be possible in Google Chrome, as answers to

How to know if the network is (dis)connected?

走远了吗. 提交于 2019-12-04 02:39:58
How can I know, in Xul, if the network is (dis)connected? --update Using: function observe(aSubject, aTopic, aState) { if (aTopic == "network:offline-status-changed") { write("STATUS CHANGED!"); } } var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); os.addObserver(observe, "network:offline-status-changed", false); and the preference: pref("network.manage-offline-status", true); it's not working.. There's a bug report here , but I don't think it has something to do with it. -- Actually I think it's not possible to be notified, as

Reading web-page cookies from a Firefox extension (XUL)

拟墨画扇 提交于 2019-12-03 17:18:40
I'm creating an extension for the Firefox browser. I would like to read a cookie which was set by an HTML page using JavaScript in the XUL file. Is it possible? I tried using document.cookie , but it doesn't work: function readCookie(name) { var ca = document.cookie.split(';'); var nameEQ = name + "="; for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return ""; } function createCookie(name, value, days) { if (days) { var date = new Date(); date

Is there a way to run ActiveX components in Firefox through the use of a plugin?

社会主义新天地 提交于 2019-12-03 15:26:23
I have an ActiveX plugin that we need (if possible) to run in Firefox. Is there a plugin (or other way) for Firefox that will allow this? I seem to have found a solution: http://code.google.com/p/ff-activex-host/ "This Firefox plugin makes it possible to use ActiveX controls in Firefox. It is based on the Gecko NPAPI and provides full access to the hosted control (events, functions, properties)." You used to be able to in Firefox 1.5 but not any longer I believe, the plugin doesnt seem to be supported anymore. More info here Not sure if this is helpful or not, but writing an NPAPI plugin for

Running unit tests of JavaScript code from XUL - what and how

可紊 提交于 2019-12-03 12:57:40
问题 I am writing an XUL application. It is not a Firefox extension but a standalone app to be used through XULrunner. My intention is to adopt TDD in my development process and I am looking at RhinoUnit as my unit testing framework. I will try to use it anyway but there is not much documentation about testing XUL applications. Some people talk about using UxU - but only for Firefox addons - and Mochitest - if you want to test Mozilla only. My question is: has someone written some XUL application

What does 'chrome' mean?

醉酒当歌 提交于 2019-12-03 08:29:21
问题 content: A browser for content. The content that is loaded inside the browser is not allowed to access the chrome above it. This sentence is seen on the Mozilla documentation for XUL. What does the word chrome mean in this context? 回答1: It is a euphemism for the graphical framework and elements surrounding the content, and thus means different things depending on the context. In the context of a web browser it is the navigation, toolbar etc. In the context of a website it is navigation, ad

Replicating Google Chrome Browser Actions popup Effect in a Firefox Extension

怎甘沉沦 提交于 2019-12-03 08:22:13
问题 Chrome Browser Actions provide a really nice popup effect by default. dead ImageShack image link removed Hovering over the toolbar icon provides a neat hover effect. Clicking the toolbar icon shows a nice animation that opens the popup html file. The popup is aligned with the button that is pressed. Clicking the toolbar icon again fades out the popup. Any thoughts on how to approximate this effect with Firefox extensions? Has anybody successfully achieved something similar to this effect?