Вы находитесь на странице: 1из 4

1

FoxAlert Extension for Mozilla Firefox Web


Browser
Department of Computer Science and Engineering, University of Moratuwa
K.K. Pavithra De Alwis
070080F@uom.lk
web browser users to get those alerts through their browser. It
Abstract—Natural hazards by its nature affect the human life is an extension that gives alerts about natural hazards to the
in various ways. It causes financial, environmental and human user as a popup message. The developer of the FoxAlert
losses. If the hazard occurred in an unexpected moment, the extension addresses vulnerable people of natural hazards such
results become much worse. Being informed about a hazard will
let the people the time to take necessary actions. Within that
as earthquakes, tsunamis, tropical cyclones, floods and
context this paper discusses FoxAlert extension; a solution for volcanoes as well as web users who are interested on that
keeping Mozilla firefox users awareness about the natural news. Activation of the extension allows web user to receive
hazards by giving alerts. It provides the users with the nearly near real-time alerts about natural disasters around the world.
real time alerts about natural disasters like Earthquakes, It automatically updates news in every five minutes or it can
Tsunamis, Tropical cyclones, Floods and volcanoes. The be done manually even by second. The extension uses RSS
extension gets the necessary information through RSS feeds.
feeds published by GDACS (Global Disaster Alert and
Coordination System) to display alerts.
I. INTRODUCTION

N atural hazards have become a controversial issue due


to the fact that most of the people worldwide have
already experienced at least one of those situations. It causes
II. LITERATURE REVIEW

serious damages not only to the environment, property and but


also to the human life. They bring various ill effects to the A. Firefox architecture
human life. The most pathetic situation of these hazards is the Firefox architecture supports for the custom extensions. As
loss of valuable human lives. James Edwards the author of "Build Your Own Firefox
When the hazards comes unexpectedly thus giving no time to Extension" says, One of the most sophisticated features in
be prepared, the situation become worse. It is quite obvious in Firefox, and arguably the most significant reason for its
each incident; the losses could have been significantly reduced continued popularity among developers, is its framework for
if the people were informed through a proper alerting system. custom extensions.[1]According to the authors of "Conceptual
The few minutes time, which is before the impact of natural Architecture of Firefox", Firefox comes with a powerful
disaster is very important. Informing those vulnerable people extension capability, which allows extensions to alter the
about the hazard in that particular time, will let them to take behaviour of the browser at various stages of the architecture.
necessary actions. This method will significantly reduce The application is comprised of several independent
deaths, injuries, and property damages caused by all natural components layered together to form what is commonly called
disasters. a layered architecture.
A layered architecture is used to simply the design and
Existing approaches to get natural hazard alerts are mentioned
maintainability of the code. Like the OSI model, the
below.
conceptual architecture provides interfaces for higher level
Users can subscribe for early warning system to get relevant
components to interact with lower level components. This
alerts by paying an amount. The user will receive alerts to his allows each component to be built in isolation, as long as each
mobile phone through SMS(Short Message Service). component adheres to a defined interface. The layered
There are some other sites, which user can register and receive architecture promotes code reuse by allowing other
e-mail notifications about natural hazards. applications the ability to easily include individual
Users also can subscribe to a RSS(Really Simple Syndication) components (Epiphany, the official web browser of the
feeds which provide feeds about natural hazards through GNOME project uses the Mozilla Engine but provides
existing RSS reader. different user interface). As the software application evolves 2
The “FoxAlert” gives a simple solution for Mozilla Firefox
2

components can be swapped out for new implementations


without affecting the components in layer above or below.[2 ] eQuake Alert[9]
eQuake Alert is a free Firefox add on which delivers
A. A reference architecture diagram of the Firefox
earthquake alerts direct to your browser.
architecture is depicted in Figure 1.

It was needed to went through the source code of four FF add-


ons which are having the same functionality (pop up
messages, menu, get weather alerts) as in this project and RSS
capabilities.

F. GDACS (Global Disaster Alert and Coordination System).


Natural hazards are taking place more frequently nowadays
than in the past. So, the need of an effective natural hazard
warning system is obvious. Reliability of the alerts is a
primary concern for such a system. This extension receives its
warning information from GDACS(Global Disaster Alert and
Coordination System).According to the GDACS, it is a
cooperation framework under the United Nations umbrella
with the aim to consolidate and strengthen the network of
B.Mozilla developer center guide providers and users of disaster information worldwide in order
to provide reliable and accurate alerts and impact estimations
Mozilla developer center tutorials provide a comprehensive after sudden-onset disasters and to improve the cooperation of
guide for less experienced firefox extension developers. international responders in the immediate aftermath of major
Mozilla Developer Centre (MDC), started in early 2005, is natural, technological and environmental disasters.[10]
the official Mozilla Foundation website for development
documentation and news about Firefox, Thunderbird, and
other Mozilla Foundation projects. It is intended to supplant G. RSS (Really Simple Syndication)
the community-driven aspect of documents authored for the The extension receives its information as RSS (Really Simple
mozilla.org website.[citation needed] To accomplish this, the Syndication) feeds. According to the information given in
website uses wiki software to maintain user-editable Technology center at Harvard Law RSS is a Web content
documents rather than CVS commits, as used for mozilla.org syndication format. It is a dialect of XML. All RSS files must
and determined to be too unwieldy shortly after MDC's conform to the XML 1.0 specification, as published on the
inception.[3] World Wide Web Consortium (W3C) website.RSS version
2.0 specification format was used to parse RSS feeds in this
C. Other extension guide sites extension.[11]
Shortest tutorial for firefox extension toolbar
development.[4]
Getting started with extension development[5] III. DESIGN AND IMPLEMENTATION

D. Other firefox extensions which has the same functionalities The “FoxAlert” is a firefox extension which gives alerts about
Source code of weatherbug-2.0.0.4-fx[6] natural hazards to the user as popup messages. It uses RSS
Gives live, local weather conditions in Firefox with the feeds to get the alerts. When the user installs the FoxAlert
Weather Bug extension. Featuring forecasts, radar, and severe extension, a small icon in status bar appears. When the mouse
weather alerts from WeatherBug's community of pointer is pointed to the icon a tool tip appears displaying
neighbourhood weather. “FoxAlert”.

Webmail_notifier-1.5.3-fx [7] When the user double click on the icon, the homepage of
Webmail Notifier checks users webmail accounts and notifies GDACs opens in a new tab(url-
the number of unread emails. http://www.gdacs.org/index.asp/). When user right click on
the icon a menu appears .If the user needs to see the latest
infoRSS[8] updates, he can select “update” from that menu.
Displays RSS, Atom, Twitter, parsed HTML and NNTP feed When a new alert receives, a notification box which contains
in a scrolling area in the status bar. Compatible with the message will appear.
podcasting RSS which can be downloaded directly. It's also a The project can be divided in to three different modules as
good Google email notifier. RSS connector, RSS converter and display unit. When the
3

plug in runs on the mozilla web browser, it search for the given feed URL. Then it sends that feed to rss parser (rss.js)
alerts. If there are any feed available, RSS connector gets that and get processed data. Finally it gives a notification to user
feed. Data alert unit is also responsible for storing subscription about new update and displays in GUI.
data. Then alert unit send this data to RSS converter. It converts Rss.js
the RSS message in to a human readable format. After that, rss.js file contains functions and implementations needed to
formatted message is sent to the display unit. Using the facilities parse the response text received from XMLHttp request. It
provided by mozilla platform, the message is then shown to the parses the rss feed and gets the relevent data from that feed
user as a popup message. and returns them.
Core technology that extensions are built with is an XML Options.js
language called XUL (eXtensible User-interface Language), Options.js file includes all the functions and implementations
which defines interface components from simple tags. Java needed to get and set user preference values through the
script was used to wrote functions. preference dialog.

B. Size and Performance


Size of the plugin will not be more than the size of typical
FF plugin. So it will not degrade the performance of FF.
Performance will be also depending on RSS feeds.

C. Quality
The plugin can be developed to register user location, so
that he can get alerts relevant to his area. The plugin will
support for further development as its architecture allows.
End product will also have a nice, user friendly interface.
Reliability will be fairly depending on the RSS feeds.

A. Overview D. Constraints
The plugin is consists of three layers primarily. The time allocated for the project is a major constraint.
• Upper layer will handle the connection establishment with User should have installed FF in prior to use the plug in
Rss feeds and parsing feeds Plug in is only available in English language
• Middle layer will do formatting of data.
• Last layer will handle the display tasks D. Assumptions and dependencies
User has installed FF.
Various RSS feed urls were combined in to one url using User knows how to enter URL for subscription.
available facility in feedstich website (http://feedstitch.com/) User is able to work in English

Functionality of Fox Alert depends on following files.


iv. RESULTS
GUI of foxAlert is consists of following XUL files. Final result of the project was a XPI file. Firefox browser
Statusbar.xul : identified it as a valid firefox extension and installed it. After
User interface of the extention is defined in this class. installation, it displayed an icon in the status bar.
Displaying icon in the status bar, tool tips, context menu and
sub menu is done by this XUL file. Firefox add-ons list
Options.xul :
Implements the user interface for collecting user preferences.
Eg: update interval.
Help.xul :
Display general guide for using FoxAlert to the users in a
separate dialog box.
About.xul :
Display the details of the developer in a separate dialog.
Functionality of FoxAlert depends on following JavaScript
files.
statubar.js
contains all the functions and implementations needed to
handle the operations in statusbar gui .When the window
loads, it loads saved or default preference values and register
preference observers to monitor changes in preference
settings. It creates a XMLHttpconnection and get feeds from Preview of a new message
4

[10] GDACS home page:


http://www.gdacs.org/about.asp

[11] RSS 2.0 specification


http://cyber.law.harvard.edu/rss/rss.html

The extension successfully received some alerts and displayed


them as popup messages.

v. CONCLUSION

This paper was about FoxAlert extension which gives alerts


about natural hazards to the Mozilla Firefox users. Natural
hazards like earthquakes, tsunamis, tropical cyclones, floods
and volcanoes, and all other disasters occur frequently around
the world. In all these incidents, the importance of an effective
alerting system is highlighted. Such application can mitigate
human and property losses in a significant way.
The FoxAlert extension will be more useful to the people
who live in those vulnerable areas.

REFERENCES

[1]” Build Your Own Firefox Extension” by James Edwards

[2]Conceptual Architecture of Firefox


http://web.uvic.ca/~hitchner/assign1.pdf
Andre Campos - 0230481 - drick@uvic.ca
Bryan Lane - 0434698 - blane@uvic.ca
Neal Clark - 0429078 - nclark@uvic.ca
Sunpreet Jassal - 0323709 - ssjassal@uvic.ca
Stephen Hitchner - 0430473 - hitchner@uvic.ca

[3]Mozilla Developer Center


https://developer.mozilla.org/

[4] Shortest tutorial for firefox extension toolbar development


http://devilsworkshop.org/shortest-tutorial-for-firefox-
extensiontoolbar-development/

[5] Getting started with extension development


http://kb.mozillazine.org/Getting_started_with_extension_dev
elopment

[6] weatherbug-2.0.0.4-fx
https://addons.mozilla.org/en-US/firefox/addon/2455

[7] webmail_notifier-1.5.3-fx
https://addons.mozilla.org/en-US/firefox/addon/4490

[8] InfoRSS
https://addons.mozilla.org/en-US/firefox/addon/5459

[9]eQuake Alert
https://addons.mozilla.org/en-US/firefox/addon/2239

Вам также может понравиться