Category: Mozilla

Dive Into Greasemonkey

Sponsor Advertisement

  • Author: Mark Pilgrim
  • Format: online HTML, archived HTML, archived PDF, archived plain text, Palm OS, archived video demonstrations
  • Price: free

Greasemonkey is a Firefox extension that allows you to write scripts that alter the web pages you visit. You can use it to make a web site more readable or more usable. You can fix rendering bugs that the site owner can’t be bothered to fix themselves. You can alter pages so they work better with assistive technologies that speak a web page out loud or convert it to Braille. You can even automatically retrieve data from other sites to make two sites more interconnected.

There is a huge repository of user scripts that do all kinds of amazing things at GreasyFork.org
But Firefox isn’t the only browser that you can write these scripts for. There is also a macro for K-Meleon called GreaseMeleon, that will allow that browser to use Greasemonkey scripts, too. And there is even a way to use them in Google’s Chrome browser. (instructions)

All this is great if all you want to do is use Greasemonkey scripts, but what if you want to write your own? That’s where Dive Into Greasemonkey can help.

It takes you step-by-step from explaining what Greasemonkey is, installing it into Firefox, installing user scripts, to actually writing and debugging your own. Chock full of information that will help the beginner and expert, alike.

Dive into Greasemonkey is a valuable reference for anyone that wants to truly unleash the power of user scripts.

Chapters include:

  • What is Greasemonkey?
  • Installing Greasemonkey
  • Installing a user script
  • Managing your user scripts
  • Hello World
  • Describing your user script with metadata
  • Coding your user script
  • Editing your user script
  • Debugging User Scripts
  • Tracking crashes with JavaScript Console
  • Logging with GM_log
  • Inspecting elements with DOM Inspector
  • Evaluating expressions with Javascript Shell
  • Other debugging tools
  • Executing a user script on a domain and all its subdomains
  • Testing whether a Greasemonkey function is available
  • Testing whether a page includes an HTML element
  • Doing something for every HTML element
  • Doing something for every instance of a specific HTML element
  • Doing something for every element with a certain attribute
  • Inserting content before an element
  • Inserting content after an element
  • Removing an element
  • Replacing an element with new content
  • Inserting complex HTML quickly
  • Adding images without hitting a central server
  • Adding CSS styles
  • Getting an element’s style
  • Setting an element’s style
  • Post-processing a page after it renders
  • Matching case-insensitive attribute values
  • Getting the current domain name
  • Rewriting links
  • Redirecting pages
  • Intercepting user clicks
  • Overriding a built-in Javascript method
  • Parsing XML
  • Case Studies
  • Case study: GMail Secure
  • Case study: Bloglines Autoload
  • Case study: Ain’t It Readable
  • Case study: Offsite Blank
  • Case study: Dumb Quotes
  • Case study: Frownies
  • Case study: Zoom Textarea
  • Case study: Access Bar
  • Storing and retrieving persistent data
  • Adding items to the menubar
  • Integrating data from other sites
  • Compiling your user script into an extension
  • Greasemonkey API Reference
  • GM_log – log messages to the JavaScript Console
  • GM_getValue – get script-specific configuration value
  • GM_setValue – set script-specific configuration value
  • GM_registerMenuCommand – add a menu item to the User Script Commands submenu
  • GM_xmlhttpRequest – make an arbitrary HTTP request
  • List of “further reading” links
  • List of tips
  • List of examples
  • List of procedures

Visit: Dive Into Greasemonkey

Creating Applications with Mozilla

Sponsor Advertisement

My image
  • Author: David Boswell, Brian King, Ian Oeschger, Pete Collins, Eric Murphy
  • Format: online HTML
  • Price: free

Mozilla is not just a browser. Mozilla is also a framework that allows developers to create cross-platform applications. This framework is made up of JavaScript, CSS (Cascading Style Sheets), and Mozilla’s XUL (XML-based User-interface Language) as well as the Gecko rendering engine, XBL (eXtensible Binding Language), XPCOM (Mozilla’s component model), and several other components.

Creating Applications with Mozilla explains how applications are created with Mozilla and provides step-by-step information about how you can create your own programs using Mozilla’s powerful cross-platform development framework.

This book also shows examples of many different types of existing applications to demonstrate some of the possibilities of Mozilla application development. One of Mozilla’s biggest advantages for a developer is that Mozilla-based applications are cross-platform, meaning programs work the same on Windows as they do on Linux or the Mac OS.

Working through the book, you are introduced to the Mozilla development environment and after installing Mozilla, you quickly learn to create simple applications. After the initial satisfaction of developing your own portable applications, the book branches into topics on modular development and packaging your application.

In order to build more complex applications, coverage of XUL, JavaScript, and CSS allow you to discover how to customize and build out your application shell. The second half of the book explores more advanced topics including UI enhancement, localization, and remote distribution.

Mozilla 1.0 was released on June 5th, 2002, after more than four years of development as an open source project. This book has been written so that all of the information and examples will work with this release and any of the 1.0.x maintenance releases. In addition to Netscape’s Mozilla-based browsers (Netscape 6.x and 7.x), the Mozilla framework has been used to create other browsers such as Galeon and Chimera, and chat clients such as ChatZilla and JabberZilla. Developers have also used Mozilla to create games, development tools, browser enhancements, as well as all sorts of other types of applications.

Chapters include:

  • Mozilla as Platform
  • Getting Started
  • XUL Elements and Features
  • CSS in Mozilla Applications
  • Scripting Mozilla
  • Packaging and Installing Applications
  • Extending the UI with XBL
  • XPCOM
  • XUL Templates
  • RDF, RDF Tools and the Content Model
  • Localization
  • Remote Applications
  • Getting and Building the Mozilla Source
  • Development Tools
  • Programmer’s Reference

http://books.mozdev.org/chapters/index.html

Firefox Add-ons Developer Guide

Sponsor Advertisement

My image
  • Author: Hideyuki Emura, Hiroshi “Piro” Shimoda, Taiga Gomibuchi, Taro Matsuzawa, Yutaka Kachi
  • Format: online HTML wiki-book
  • Price: free

This guide is based on an earlier tutorial written and printed for an Add-ons conference organized in Japan, back in June 2007. It has been updated for the Firefox 3.5 release.

The document will guide and assist add-ons developers eager to develop their own Firefox add-ons. It is targeted to all types of users, from the experienced developer who needs a little push in the right direction, to the beginner looking to get his hands dirty, but not sure where to begin.

It is an ongoing wiki-book work in progress and subject to change, as needed and revised.

Chapters include:

  • Introduction to extensions
  • Technologies used in developing extensions
  • Introduction to XUL: How to build a more intuitive UI
  • Using XPCOM: Implementing advanced processes
  • Let’s build a Firefox extension
  • Firefox extensions and XUL applications
  • Appendix: What you should know about open-source software licenses

https://developer.mozilla.org/En/Firefox_addons_developer_guide

Rapid Application Development with Mozilla

Sponsor Advertisement

My image
  • Author: Nigel McFarlane
  • Format: archived PDF
  • Price: free

A concise guide for any programmer who wants to learn the versatility and compatibility of Mozilla, an open source toolset with over a thousand objects and components.

An additional feature of this book is the NoteTaker Web browser add-on, a sample Mozilla application that is developed throughout the book.

This book is the perfect addition to the library of any user-interface software engineer, cross-platform developer, or any programmer looking to discover the benefits of rapid application development.

Chapters include:

  • Fundamental Concepts
  • XUL Layout
  • Static Content
  • First Widgets and Themes
  • Scripting
  • Events
  • Forms and Menus
  • Navigation
  • Commands
  • Windows and Panes
  • RDF
  • Overlays and Chrome
  • Listboxes and Trees
  • Templates
  • XBL Bindings
  • XPCOM Objects
  • Deployment

http://www.informit.com/content/images/0131423436/downloads/0131423436_pdf.zip
Download source code examples