extension

How do I access a .xul file using a chrome:// URL ?

I'm learning how to make firefox extensions. I have created a directory called findfile, under which I have the directories content/ skin/ and locale/ . There is a findfile.xul file in the content/ directory. The other two are empty I have placed a findfile.manifest file under /home/akshay/.mozilla/firefox/xxxx.dev/chrome/ The content...

Is there any way to make an existing type implement an interface?

Let's say I write a really kick-ass interface. So kick-ass, in fact, that I'd like some of the builtin types I use to implement them, so that whatever code I write that uses this interface can also use the builtin types. public interface IKickAss { int Yeahhhhhhh() { get; } } public static class Woot { public int Bar(IKickAss a...

How to run my ruby application using ruby extension library (in c), in windows?

Hello, I would be thankful for any help on this: I want to write an extension to my c library. I created file zmq.cpp that uses library libzmq (written in C++). I created makefile using ruby extconf.rb, then I run nmake. It all went fine. Nmake generated files librbzmq-i386-mswin32.def librbzmq-i386-mswin32.lib librbzmq-i386-mswin32...

generic extension method

I am working on this mvc project following Rob Connery's storefront video series and applying the techniques. On the filtering and extensions methods, i started repeating myself a lot such as: public static Sponsor WithID(this IQueryable<Sponsor>qry, int ID) { return qry.SingleOrDefault(s => s.ID== ID); } public static Keyword With...

How to add elements to web page from Firefox extension

I'm going to develop a Firefox extension which should put a button in the loaded pages, when the tag: <input type="file" ... > is found and a file has been selected. Likewise, I think the skype toolbar does a similar thing: when a website contains a phone number, the Skype extension automatically converts it into a button that can be cl...

Removing element from web page through firefox extension

I'm going to develop a firefox extension which adds a button beside the file input fields (the <input type="file"> tag) when a file is selected. The file overlay.js, which contains the extension's logic, manages the "file choose" event through this method: var xpitest = { ... onFileChosen: function(e) { var fileInput = ...

How can I load dll within FireFox xpi to local PC directory before extension install is complete

My FireFox extension has an external dll dependency for functioning. So I include that dll inside my xpi and copy that dll to the right directory in first run. But it does not work for me because I found my own dll (written in XPCOM C++) expects to see that external dll during install. So every time I have to manually put the external dl...

Firefox Extension -- Load page in menu bar?

I am not sure if this is possible, partly because I have no clue what the terminology would be... I want to create an extension that, among other things, will have a feature where, when the user clicks on the status bar icon a small window will slide out and inside that window will be a website login page. They would then login as norma...

Log the REQUEST_URI variable when php is set to log to syslog.

This is the source code of php_log_err. I would like to modify it to be able to log the variable _SERVER["REQUEST_URI"] /* {{{ php_log_err */ PHPAPI void php_log_err(char *log_message TSRMLS_DC) { FILE *log_file; char error_time_str[128]; struct tm tmbuf; time_t error_time; /* Try to use the spe...

will an iframe in xul maintain ssl security?

Anyone reading my last batch of questions knows I'm working on a Firefox add-on for my office intranet. So, here's the latest; this time a concern instead of an obstacle: So, my first plan was to build a sign-in form right into the chrome, so that it blended and didn't require any dealings with iframes/browsers/etc. But after some think...

Extending JPA entity data at runtime

I need to allow client users to extend the data contained by a JPA entity at runtime. In other words I need to add a virtual column to the entity table at runtime. This virtual column will only be applicable to certain data rows and there could possibly be quite a few of these virtual columns. As such I don't want to create an actual add...

Converted project .net 2.0 to 3.5, where are the extension methods?

Hi, I've recently converted an app from .net 2.0 to 3.5 but I don't see any extension methods... what am I doing wrong? Or what else should I do besides changing the target framework from 2.0 to 3.5 in project settings? ...

php extension on windows xp

I've installed php on my xp, but failed to add an extension to mysql Here is what I did in php.ini: [PHP_MYSQL] extension=php_mysql.dll and there is such a file in ext/ but when I look into phpinfo(), only to find that mysql extension is still not added. What have I did wrongly? ...

Firefox extension to log out user after the page has been closed

Hello all. I am writing my first FireFox extension and I have some questions. Maybe someone can help. I have a website which requires login. The sign-in is one user per login type. So if I am logged with the username "tom" from one PC and go to other PC and try to login with the same details, it fails. When I click the log-out button fr...

unzip specific extension only

I have a a directory with zip archives the zip archives contain .jpg, .png, .gif images I want to unzip each archive taking the images only and putting them in a folder with the name of the archive so files/archive1.zip files/archive2.zip files/archive3.zip files/archive4.zip open archive1.zip - take sunflower.jpg, rose_sun.gif...

Firefox extension: how can I pass user selected text as variable to Javascript?

Hello, When writning very simple and basic extension for firefox, what event (I don't know if this is the right word) should I use if I want to process user selected text? To be more precise: when user selects some text (for example when ALT is pressed), I want to pass this text to function, grab some data from the web (based on select...

How to make a Firefox addon listen to xmlhttprequests from a page?

Background I have an existing extension designed to accompany a browser-based game (The extension is mine, the game is not). The extension had been scraping the pages as they came in for the data it needed and making ajax requests for taking any actions. Problem The game developers recently changed a number of actions on the site to use...

How do I Inject Javascript with Firefox Extension

Hey guys, I am building a Firefox extension and have come a long way. One of the parts of my extension is where I display a DIV at the bottom of the page and I want to put an ad into the div, but for some reason every time it does so, it redirects to another page entirely with the ad on it. So it looks like its not allowing me to inse...

(U) Ruby Extensions: rb_gc_mark() and instance variables

I'm writing a ruby extension that defines a class. If I use Data_Wrap_Struct() to implement my callback for rb_define_alloc_func(), do I need to manually mark and free the instance variables? Or is that still handled for me? ...

How do I import a directory (and subdirectory) listing in Java?

Here is the code I have thus far: import java.io.*; class JAVAFilter implements FilenameFilter { public boolean accept(File dir, String name) { return (name.endsWith(".java")); } } public class tester { public static void main(String args[]) { FilenameFilter filter = new JAVAFilter(); File directo...