Asiaing.com: Free eBooks, Free Magazines, Free Magazine Subscriptions

Sunday
Mar 21st
Text size
  • Increase font size
  • Default font size
  • Decrease font size

Build Your Own Firefox Extension

November 05 2009

Build Your Own Firefox Extension, download free eBook, pdf format.“Learn the simplicity of creating your own Firefox Extensions!”

If you want to build custom extensions for Firefox, then this is the book for you! After reading Build Your Own Firefox Extension, you’ll be able create simple Firefox extensions with extremely powerful functionality.

Preface
One of the main reasons for the explosive and continued popularity of Firefox is its framework for custom extensions. What many web developers don’t realise is that they’re so easy to create and implement — anyone with a minimal understanding of JavaScript and XML can build a Firefox add-on. After reading this book, you’ll be able create simple Firefox extensions with extremely powerful functionality.

Who Should Read This Book
If you want to build custom extensions for Firefox, then this is the book for you! With a little JavaScript know-how, author James Edwards will show you just how straightforward it is to build your own Firefox add-ons.

Visit Build Your Own Firefox Extension Download Page

You can download Build Your Own Firefox Extension in PDF for FREE.

TABLE OF CONTENTS
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Where to Find Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
The SitePoint Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
The Book’s Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
The SitePoint Newsletters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
The SitePoint Podcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Conventions Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Tips, Notes, and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Chapter 1 Making a Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Firefox Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Understanding Chrome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Step 1: Create a Development Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Step 2: Define Key Meta Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Step 3: Create a Basic Overlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Step 4: Point Firefox at Your Development Folder . . . . . . . . . . . . . . . . . . 12
What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 2 Developing and Testing Your
Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
XUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Styling XUL Elements with CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
JavaScript and the DOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Event Handling in XUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
The Relationship between Properties and Attributes . . . . . . . . . . . . 26
Opening Windows and Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Working with the Content Document . . . . . . . . . . . . . . . . . . . . . . . . 29
Using the Preferences System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 3 Adding Accessibility and
Internationalization . . . . . . . . . . . . . . . . . . . . 35
Adding Keyboard Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Language Data in XUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Language Data in JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The Big Moment Has Arrived! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Chapter 4 Publishing Your Extension . . . . . . . . . . . . 43
Creating an XPI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Making an Install Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Submitting Your Extension to the Add-ons Directory . . . . . . . . . . . . . . . 46
Now It’s All Up to You! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Appendix A Introducing Jetpack . . . . . . . . . . . . . . . . . . . . . 49
How Are Jetpack Extensions Programmed? . . . . . . . . . . . . . . . . . . . . . . . . 50
How Does Jetpack Compare to XUL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Here’s What Jetpack is Really Good for . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
So Where's it Heading? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

About the Author
James (aka brothercake) is a front-end developer based in the UK, specializing in advanced JavaScript programming and accessible web site development. He's an outspoken advocate of standards-based development, and contributing author to SitePoint's The Art & Science of JavaScript (http://www.sitepoint.com/books/jsdesign1/). His web site can be found at http://www.brothercake.com/.

About SitePoint
SitePoint specializes in publishing fun, practical, and easy-to-understand content for web professionals. Visit http://www.sitepoint.com/ to access our blogs, books, newsletters, articles, and community forums.

Comments (0)add comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smaller | bigger

busy
Last Updated ( November 05 2009 )
 
< Prev   Next >

Subscribe

 Subscribe to the RSS feed. 

Email Subscription

Lots of FREE books & magazines delivered directly to your e-mail inbox!

Enter your email address:

eBooks, free eBooks
WebAsiaing.com