1. YZU Open Source Software Community Lecture
OSSF / MozTW / YZU CSE
The Secret in the
Extension Development
for Mozilla Firefox
by Littlebtc (Hsiao-Ting Yu)
The text of the slide is under CC-BY-SA-3.0.
Most photos are under CC-BY-SA compatible license,
while screenshots / logos are under Fair Use.
2. Me
• Undergraduate major in EE in NTU
• A Programmer (PHP)
• A Web Developer
– HTML/CSS
– Mozilla Technique (NicoFox)
5. FREE SOFTWARE?
→You can use, distribute and modify the software
without restriction.
OPEN SOURCE?
→The source code of software should be available and
modification should not be restricted.
6. OSSF
• A project in the Institute of Information Science of Academia
Sinica
• Spread the Free / Open source software spirit
• Support Free/Open Source Software community in Taiwan
7. MozTW http://moztw.org/
• A Community in Taiwan spreading the Firefox and Mozilla-related software
• Translate Firefox/Thunderbird/… to Traditional Chinese
• It is not so technical! It is a community devoting to improve your web
experience.
http://www.flickr.com/photos/bobchao/3049469807/
http://www.flickr.com/photos/othree/3147927774/
10. Browser War I
• I started to surf the Internet since 1997, using
36.6K Modem
• At that time, the most popular browser is
Netscape, while I am an IE fans :p
• No AJAX, no CSS (<table> layouts)
• No rich media: Speed of Internet is still very
slow
13. Browser War I
• Why Internet Explorer wins: (I think that)
– FREE of charge & bundled with Windows
– Development of IE was active
– Killer Applications: FrontPage
– DHTML, CSS, VBScript support
– Netscape got in troubles: rewrite, lost AOL
support, etc.
27. “Mozilla”
• Originally, it is Netscape’s codename
• 1998: Mozilla Organization: “Co-ordinate” the
development of Netscape
• Netscape 6 & 7 : Not so success
• 2003: Browser(Firefox)/Mail(Thunderbird)
Netscape closed down
Independent Mozilla Foundation
30. Why Firefox?
• Free and Open Source Software
• A browser that is easy to use
• Highly web standard compatible
• And also easy to extend!
• Every Firefox can be different!
34. Extensions
• One of the “Add-ons”:
– Extensions, Themes, Plugin
• “Extend” your browser
– Provide more features
– Fix some problem
– Integrate with sites or applications
35. Extensions with Single Feature…
• Locationbar2
• Hide Menubar (Made in Taiwan!)
After Press Alt
46. … and this is part of the the
“Main Browser Window”.
47. Wait? Wait!
Is this HTML / JavaScript?
=> No, but something similar to this
48. • “Write” Interface in an XML
XML User Interface text format
Language
– Just Like write web pages in
XUL HTML
• Cross-platform interface
elements
THERE IS NO DATA.
THERE IS ONLY XUL.
<button />
49. • Used in both web and
program!
Easy but
powerful • A major part of the
JavaScript source code in Mozilla
Firefox is in JavaScript!
• JavaScript in Firefox core
Web
is able to access some
<script type=“text/javascript”> core API
alert(‘Hello World!’);
</script>
Firefox Core
<script type=“x-application/javascript”>
alert(‘Hello World!’);
</script>
50. • In Web: A powerful and
modern styling language
Make Your Style
• In Firefox Core: Still
CSS powerful to design interface
in detail
– Styling toolbar, button, and
Web
more…
h1 {
font-size: 160%;
color: #999999;
}
Firefox Core
label{
width: 500px;
}
51. Ways to custom your Firefox?
Method Website Application (Firefox, …)
User Style Sheets (CSS) UserContent.css, Stylish UserChrome.css
User Script (JavaScript) Bookmarklet, Greasemonkey UserChrome.js
Extensions Easy but powerful
Themes (Not supported) Very flexible