background preloader

Dev

Facebook Twitter

Firefox Help: Tips & Tricks. This page contains various tips and tricks for Firefox.

Firefox Help: Tips & Tricks

Most of these tips involve editing of text files on your hard drive and is not recommended if you're not familiar with basic file and folder usage. The tips are divided into four categories and sorted by importance/popularity. Contents Browser Appearance If you want the menus to appear native to the Windows Classic appearance, add the following code to your userChrome.css file: Use your own background image for the toolbars In addition to changing themes, you can personalize Firefox even more by using your own toolbar background image. It's easiest to place the image file in the same location as the userChrome.css file. Don't use bold text on the active tab. Chrome element names and IDs. Firefox Help: Tips & Tricks. This page contains various tips and tricks for Firefox.

Firefox Help: Tips & Tricks

Most of these tips involve editing of text files on your hard drive and is not recommended if you're not familiar with basic file and folder usage. The tips are divided into four categories and sorted by importance/popularity. Contents Browser Appearance If you want the menus to appear native to the Windows Classic appearance, add the following code to your userChrome.css file: Use your own background image for the toolbars In addition to changing themes, you can personalize Firefox even more by using your own toolbar background image.

Mozdev.org - pyxpcomext: index. Skulpt. Pythonext - Python XPCOM extension. This project provides Python Mozilla bindings (PyXPCOM) that enables Python to be used inside of Mozilla applications like Firefox, Thunderbird and XULRunner.

pythonext - Python XPCOM extension

The Python bindings are wrapped up in an extension (XPI file) so that users can easily install Pythonext just like any other Mozilla/Firefox extension. Compatibility Firefox 6 (and XULRunner 6) - use pythonext version 6 from the downloads area Firefox 5 (and XULRunner 5) - use pythonext version 5 from the downloads area Firefox 4 (and XULRunner 2) - use pythonext version 2 from the downloads area Firefox 3 and earlier - use pyxpcomext from Install the Pyshell extension from the downloads area to test that it's worked Why do this? It gives the power of Python to Mozilla extension developers Easy to setup multi-threaded tasks Rapidly build cross platform extensions, no compilation issues!

WebBrowserProgramming. TODO: merge in and research these, found on comp.lang.python Yes, Python can do it... on Windows.

WebBrowserProgramming

Two (examples) ways: TODO: Add mention of IPython Notebook which can be run remotely, easily on AWS, and used within your browser. The HTML client can also interact with JavaScript and DOM, though this feature isn't quite merged yet. There's a lot being done on it, but it's already being used and probably should be mentioned here. To clarify what type of technology goes onto this page, some examples of types of technology that can and cannot be added to this section: Specifically excluded from the list is technology that simply generates static HTML content. Add-on Builder. The Add-on Builder was a web-based development environment that allowed developers to create add-ons using the SDK APIs, but without needing to use the cfx command line tool.

Add-on Builder

It was retired on April 1, 2014, and the "builder.addons.mozilla.org" domain now redirects to this page. If you have only used the SDK through the Builder, you already know most of what you need to know to develop using just the SDK. The high-level and low-level APIs used for Builder add-ons are exactly the same for Builder and SDK. To switch to the SDK: Windows - Add-on SDK Documentation. Enumerate and examine open browser windows, open new windows, and listen for window events.

windows - Add-on SDK Documentation

Usage The windows module provides basic functions for working with browser windows. Low-Level APIs - Add-on SDK Documentation. Tabs - Add-on SDK Documentation. Open, manipulate, and access tabs, and receive tab events.

tabs - Add-on SDK Documentation

Usage Open a tab You can open a new tab, specifying various properties including location: var tabs = require("sdk/tabs"); tabs.open(" Track tabs You can register event listeners to be notified when tabs open, close, finish loading DOM content, or are made active or inactive: var tabs = require("sdk/tabs"); tabs.on('open', function onOpen(tab) { myOpenTabs.push(tab);}); tabs.on('ready', function(tab) { console.log('tab is loaded', tab.title, tab.url)});

Tabs configuration, extracted from About:config entries - MozillaZine Knowledge Base. Location: This page was created to be a companion of my page on Tabbed Browsing in Firefox.

Tabs configuration, extracted from About:config entries - MozillaZine Knowledge Base

The table on this page consisting of selected tab and window items has been extracted from which is part of the MozillaZine_Knowledge_Base article Heuer's Razor: "If it can't be turned off, it's _not_ a feature. " (is often quoted in Developer groups.) Developer Network. Getting started with extension development. From MozillaZine Knowledge Base Two major extension developers' features introduced in Firefox 1.5 were the greatly simplified chrome registration scheme and the reworked Extension Manager.

Getting started with extension development

These changes make it even easier to start writing extensions. This article describes steps needed to get started with extensions development. Last two sections have a few development tips and packaging information. Most of it is targeted at beginners in extension development, although the setup tips should be useful for everybody.

It's a wiki page, so feel free to make improvements to this page and to add your feedback on the Talk page. Web API reference. Tabbed browser - Code snippets. Here you should find a set of useful code snippets to help you work with Firefox's tabbed browser.

Tabbed browser - Code snippets

The comments normally mark where you should be inserting your own code. Each snippet normally includes some code to run at initialization, these are best run using a load listener. These snippets assume they are run in the context of a browser window. Window.history - Web API reference. « Window The Window.history read-only property returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in). Syntax var historyObj = window.history; The obtained History object has the following methods:See Manipulating the browser history for examples and details.

In particular, that article explains security features of the pushState() and replaceState() methods that you should be aware of before using them. Window open() Method. DOM Reference - Document Object Model (DOM) The Document Object Model (DOM) is a programming interface for HTML and XML documents. It provides a structured representation of the document (a tree) and it defines a way that the structure can be accessed from programs so that they can change the document structure, style and content. The DOM provides a representation of the document as a structured group of nodes and objects that have properties and methods.

Essentially, it connects web pages to scripts or programming languages. Though often accessed using JavaScript, the DOM is not part of it and it can be used by other languages, though this is much less common. Window - Web API reference. « DOM Reference The window object represents a window containing a DOM document; the document property points to the DOM document loaded in that window. A window for a given document can be obtained using the document.defaultView property. This section provides a brief reference for all of the methods, properties, and events available through the DOM window object. The window object implements the Window interface, which in turn inherits from the AbstractView interface. Some additional global functions, namespaces objects, interfaces, and constructors, not typically associated with the window, but available on it, are listed in the JavaScript Reference and DOM Reference.

In a tabbed browser, such as Firefox, each tab contains its own window object (and if you're writing an extension, the browser window itself is a separate window too - see Working with windows in chrome code for more information). Properties. Building an extension. Introduction This tutorial will take you through the steps required to build a very basic extension - one which adds a status bar panel to the Firefox browser containing the text "Hello, World! ". Note: The extension created by this tutorial won't work in Firefox versions that don't have a static status bar (that is, Firefox 4 and up). You can find a more up-to-date tutorial in the XUL School tutorial The Essentials of an Extension. Since Firefox 4 (and other Mozilla 2 based applications) there are two types of extensions: Traditional, classic, or XUL extensions are more powerful, but more complicated to build and require a restart to install. JavaScript Guide - JavaScript.

The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the JavaScript reference. This Guide is divided into the following chapters. Introduction. 18.2. json — JSON encoder and decoder — Python v2.7.5 documentation. Extensible JSON encoder for Python data structures. Supports the following objects and types by default: To extend this to recognize other objects, subclass and implement a default() method with another method that returns a serializable object for o if possible, otherwise it should call the superclass implementation (to raise TypeError).

If skipkeys is false (the default), then it is a TypeError to attempt encoding of keys that are not str, int, long, float or None. Simplejson — JSON encoder and decoder — simplejson v2.1.1 documentation.