Mercurial > ambnews-firefox
comparison ambnews/content/ambnews.js @ 2:88b12596346d
Added an about:news handler and made the default page for new tabs about:news.
| author | Atul Varma <varmaa@toolness.com> |
|---|---|
| date | Thu, 21 Aug 2008 17:00:35 -0700 |
| parents | 44bcb4975ead |
| children | 2f424bef178f |
comparison
equal
deleted
inserted
replaced
| 1:44bcb4975ead | 2:88b12596346d |
|---|---|
| 90 var page = AmbNews.url(aEvent.target.baseURI); | 90 var page = AmbNews.url(aEvent.target.baseURI); |
| 91 var feed = AmbNews.url(aEvent.target.href); | 91 var feed = AmbNews.url(aEvent.target.href); |
| 92 annSvc.setPageAnnotation(page, "AmbNews/feed", | 92 annSvc.setPageAnnotation(page, "AmbNews/feed", |
| 93 feed.spec, 0, annSvc.EXPIRE_WEEKS); | 93 feed.spec, 0, annSvc.EXPIRE_WEEKS); |
| 94 } | 94 } |
| 95 }, | |
| 96 onLoad: function AmbNews_onLoad(aEvent) { | |
| 97 if (aEvent.target.baseURI == "about:blank") { | |
| 98 var doc = aEvent.target; | |
| 99 doc.defaultView.location = "about:news"; | |
| 100 } | |
| 95 } | 101 } |
| 96 }; | 102 }; |
