1. Check the URL in the address bar against a list (on local machine)
2. If on list redirct to given site.
3. Allow for update of the list from a central server.
Sounds simple, but i don't really know where to start.
I am new to extension development (I have done Hello World in status
bar) *smile*
Can somebody point me in the right direction.
Thanks
if (myURLArray.some(function(e, i, a) {return document.location.indexOf(e)>-1;})) {
// redirect
document.location = "http://my.new.location.com";
}
You might consider using a regular expression match instead of indexOf().
3. Use XmlHttpRequest() to retrieve the file, then XMLSerializer.serializeToStream() to write to disk.
Thanks
_______________________________________________
dev-extensions mailing list
dev-ext...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-extensions