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?
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.
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"))
returntrue;
returnfalse;
}
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.