add-on

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, {

Accessing cookies, hopefully in JavaScript

大憨熊 提交于 2019-12-05 21:07:08
I am working on a Firefox add-on that will allow users (all of whom are part of a specific group; this add-on is very limited in audience scope) to see the status of their authentication cookie from the status bar. We all have to authenticate to access work-related sites, but we get no warning when the cookie expires, so this causes annoying and sometimes drastic interrupts in work flow. Eventually, this add on will allow us to submit our credentials from the status bar without having to go to do any reloads or redirects, but for now, I just want to see it show the status. I have been looking

How to get field lists using the OpenERP Report Designer Addon for OpenOffice / LibreOffice

最后都变了- 提交于 2019-12-05 18:46:57
I want to add fields to the reports and use them in python functions and do some coding inside the reports. I am using version 6.0.3 of OpenERP, I keep getting an empty field list. This is what the "add field" command on the addon should look like: I am using the "OpenERP Report Designer" addon for OpenOffice / LibreOffice. The "Add a field" command in the OpenOffice addon does not work for me. It shows an empty field list. I tried in 6.0.3 on a linux and a windows server and also 6.0.2 on a windows server. I believe all other commands of the report designer do work. Is there a way to make it

Creating this kind of popup in Firefox Addons?

こ雲淡風輕ζ 提交于 2019-12-05 17:51:50
I'm trying to create a popup like this for use in my addon - is it possible? If so, how's it done? Thanks in advance! It is also possible to do this by creating a panel and setting it's type to "arrow". In fact that's almost the same example that they have on the panel.type reference page : Here's how to do it: <panel id="testPanel" type="arrow"> <vbox> (... content goes here ...) </vbox> </panel> Then you would open it with: panel.openPopup(elementThatShouldTriggerIt, "before_start", 0, 0, false, false); More information on MDN.Panel It's possible in Firefox/XUL, it's also called as door

How to check for correct type when calling ObjectWrap::Unwrap in a Nodejs add-on?

一世执手 提交于 2019-12-05 05:23:53
I have 2 C++ classes exposed as javascript classes, VanillaOption and NoomraEngine , both inheriting from ObjectWrap . In the following method in NoomraEngine , I m supposed to receive a previously "wrapped" VanillaOption : Handle<Value> NoomraEngine::Price(const Arguments& args) { HandleScope scope; Local<Object> object = args[0]->ToObject(); // VanillaOption expected in args[0] VanillaOption* equityOption = ObjectWrap::Unwrap<VanillaOption>(object); Local<Number> x = Number::New(this->price(equityOption)); return scope.Close(x); } Everything works fine except that if I pass the wrong type to

Get stream URL from openload [closed]

匆匆过客 提交于 2019-12-04 23:29:40
how i m gonna do, to play openload.co links in my kodi addon, they dont work like this one here from my openload account https://openload.co/embed/KssEQSo7h90/CyberFilmesHD.mp4 or https://openload.co/f/KssEQSo7h90 Jitesh Try openload api ( Link - https://openload.co/api ) First you need to generate an authenticated ticket using this url https://api.openload.co/1/file/dlticket?file={file}&login={login}&key={key} where file = KssEQSo7h90 ( in your case ) You will get ticket in JSON format Second, to generate download link using below url - https://api.openload.co/1/file/dl?file={file}&ticket=

Mozilla FireFox Addons -> Include external library in main.js

拥有回忆 提交于 2019-12-04 20:44:01
I need to import/include a javascript file in my main.js in my FireFox Addon, but as the main.js does not contain a "document" I can not insert it the normal/easy way. I've tried some stuff but never got it working. Here is what I exactly want to accomplish: I use an external timezone detection script ( https://bitbucket.org/pellepim/jstimezonedetect/overview ). I need to determine the timezone in the main.js to download the Google Calendar File + convert the times to the users timezone. This can not be done later! Until now I just inserted the code manually into the file (copy+paste), but

Find original main domain name based on add-on domain name

半城伤御伤魂 提交于 2019-12-04 19:42:34
This may not even be possible but I'm trying to figure out the URL of the main domain for an add-on domain. Lets say for example the site is at mymaindomain.com. If I go to http://mymaindomain.com/cpanel (or :2082 or :2083) I get nothing. That is because mymaindomain.com is an add on domain for the hosting account. Lets say the primary domain on the account is myprimarydomain.com and this was the domain originally set up with the hosting account. However, this domain is no longer valid and not being leased by the hosting client anymore. If I log in to cpanel using the old main domain by going

Get code from my google spreadsheet addon after publishing

六眼飞鱼酱① 提交于 2019-12-04 18:59:54
I had published a private addon on google spreadsheet. However, the problem is, I lost the app script source code for my addon. I need to make some changes and publish it again. How can I possibly get/download the code from the spreadsheet addon that I published on the chrome web-store? I tried looking on https://chrome.google.com/webstore/developer/dashboard where there is a list of all my addons published but there's no option for reading the source code. A quick google search reveals nothing regarding this. Any suggestions? I figured out a way to find the code. From your developer dashboard

How to add UI elements from a bootstraped Firefox addon

a 夏天 提交于 2019-12-04 18:48:15
I am writing a Firefox addon for Firefox 4 which allows you to create bootstraped addons (addons that do not require a restart of the browser), however, they do not allow you to use XUL to create UI elements. What is an easy way to create UI elements in places like the tools menu (with JavaScript), and how do I make my addon open a new window to interface with the browser? It's not easy right now. You need to keep track of browser windows as they open and close and add your UI to each window manually via DOM APIs See how it's implemented in the Addon (formerly Jetpack) SDK: https://github.com