making a "plugin" for firefox

closed account (Dy7SLyTq)
im on linux, and use firefox as my main browser. how would i go about writing something for the browser so that when i post something on this site it appends a signature to it?
closed account (13bSLyTq)
Hi,

There is a SDK for Firefox development, all the plugins are more or less like IE 's BHO difference being they are Firefox compatible.

The SDK for Firefox plugin development:
https://addons.mozilla.org/en-US/developers/builder
closed account (Dy7SLyTq)
alright. thanks! is there a tutorial for the (well im assuming there is one) api?
closed account (13bSLyTq)
Hi,

There is there is the tutorial on the actual SDK page. The beginners tutorial:
http://videos-cdn.mozilla.net/serv/marketing/Firefox5/AddOnsBuilderTutorial.mp4

Just browse through the entire Firefox developer website.
closed account (Dy7SLyTq)
thank you!
closed account (Dy7SLyTq)
quick question, how would i test if im on the correct site? i want it to test on any page of c++.com (ie like this one) but it only says its the correct site if im actually on the index. here is my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require("sdk/tabs").on("ready", CatchURL);
 
function CatchURL(tab)
{
    if(IsCorrectSite(tab))
    {
        console.log("On Correct Site!");
    }
}

function IsCorrectSite(tab)
{
    var site = new String(tab.url);

    if(site.search("www.cplusplus.com"))
        return true;
    return false;
}
closed account (yADwAqkS)
TBH, idk. I'm guessing it would be if(site.search("www.cplusplus.com/*"))
It's like that in JS for Chrome, anyway.
Just look up for string.search for javascript:
http://www.w3schools.com/jsref/jsref_search.asp
closed account (Dy7SLyTq)
thank you guys! your regex worked rets. i think my problem was i was used to regex_search which doesnt have to match the whole string, but search does.
Topic archived. No new replies allowed.