background preloader

Building an extension

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. This article explains how to build a traditional extension for Firefox. For a tutorial on building an extension for Thunderbird, see Building a Thunderbird extension. Quick Start A Hello World extension similar to what you can generate with the Extension Wizard is explained line-by-line in another tutorial from MozillaZine Knowledge Base. <? XUL Overlays

Как сделать FF удобней — пишем свои кнопки Преамбула Я перешел на FF с IE очень давно — мне нужен был браузер с удобными средствами разработки и отладки, позволяющий полностью настраиваться «под себя» так как это был мой основной рабочий инструмент — инструмент должен быть удобным. И FF полностью справился со своими обязанностями — возможно, я кому-то покажусь странным — но я потратил около 2-х месяцев на чтение сайта с дополнениями и нахождения для меня лучшего их набора, настройки и т.д. В результате я получил мощную хорошо настроенную и удобную программу для своих нужд. Не смотря на то, что я знаю JS, мне ни разу не пришло в голову писать какие-либо расширения под ff по одной простой причине — чтобы я не захотел — это уже было в депозитории расширений. Вчера мне подумалось вот о чем — во время работы мне все время нужно переключаться и заходить на localhost, где крутится мой апач с текущим проектом, и на адрес где текущий релиз проекты выложен в интернете — вполне стандартная ситуация. Поиски... if ( ! Вот оно! Инициализация: P.S.

Extension Frequently Asked Questions This is quick set of answers to the most common issues with extension development. They are currently written with mostly Firefox in mind, but most if not all should easily translate to SeaMonkey, Thunderbird or any of the other applications. For Thunderbird, you may also find the extension HowTo or FAQ pages helpful. If you're looking for a place to get started, try our tutorial, Building an Extension or MozillaZine's Getting started tutorial. Be sure to set the development preferences. Debugging You should set development preferences before attempting to debug your extension. The Venkman JavaScript debugger may be useful in complex cases, remember to turn off the "Debug -> Exclude Browser Files" option when working on extension code. How can I see errors in my code? After you set the preference javascript.options.showInConsole to true, the errors will be reported to the Error Console. How can I display what my extension is doing? Why doesn't my script run properly? or Example code

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. 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. An introduction to the DOM is available. DOM interfaces Obsolete DOM interfaces The Document Object Model is in the process of being heavily simplified. HTML interfaces A document containing HTML is described using the HTMLDocument interface. HTML element interfaces Other interfaces Obsolete HTML intefaces SVG interfaces SVG element interfaces SVG data type interfaces Static type Animated type SVG Path segment interfaces Other SVG interfaces See also

Создание расширений под IE,Firefox,Chrome... - Форум C# для начинающих 1) Через реестр. 2) Что вы подразумеваете под поиском по-умолчанию? Дефолтную страницу, или отдельно прикрученный плагин в виде тулбара? Если первое, то опять-таки через реестр можно установить стартовую страницу для браузера. Если второе, то вам нужно копать в сторону написания плагинов для каждого браузера в отдельности. Причем, это нетривиальная задача, и понадобится немало времени, чтобы изучить все тонкости синтаксиса и прочие аспекты. Вообще, не советовал бы вам заниматься написанием плагинов для всего подряд. По этому примеру будете вытягивать остальные ключи из реестра.

Extensions Modify and extend Mozilla applications Add-ons add new functionality to Gecko-based applications such as Firefox, SeaMonkey, and Thunderbird. There are two main types of add-on: Extensions add new features to the application, while Themes modify the application's user interface. Add-ons can greatly affect the behavior of the application that hosts them. Extensions Extensions add new functionality to Mozilla applications such as Firefox and Thunderbird. There are three different techniques you can use to build extensions: Add-on SDK-based extensions, manually bootstrapped restartless extensions, and legacy extensions. Add-on SDK extensions Extensions built using a set of high-level JavaScript APIs, which don't require a browser restart to install. WebExtensions We're working on a system called WebExtensions, which is a new way to develop WebExtensions for Firefox, that will be largely compatible with the system used by Chrome and Opera. Debugging Recommended practices Performance Security

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. 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 Note that properties which are objects (e.g.,. for overriding the prototype of built-in elements) are listed in a separate section below. Window.applicationCache An OfflineResourceList object providing access to the offline resources for the window. Window.closed Window.Components Methods

FireFox (первые шаги) Создание расширения для FireFox (первые шаги) Статья добавлена: 2005-10-04 Одним из полезнейших свойств популярного браузера FireFox является система расширений (extentions). Вступление Файловая структура Расширения FireFox имеют собственную структуру файлов и нам нужно создать ее правильно, чтобы все работало как надо. Внутри создадим еще одну директорую. +- HelloWorld/ +- chrome/ +- content/ Начинаем работу В любом расширении FireFox должно быть как минимум два файла - install.rdf и contents.rdf . install.rdf Сперва мы создадим "install.rdf". +- install.rdf В этом файле мы должны описать наше расширения для менеджера расширений браузера FireFox, сообщив ему разную полезную информацию (например - с какими версиями браузера совместимо данное расширение). xmlns:em=" Vasya Pupkin A very simple Firefox extention {65b3130e-8513-41b6-8ea8-43dbd9cc0b12} HelloWorld {ec8030f7-c20a-464f-9b0e-13a3a9e97384} content/ A very simple Firefox extention.

What are the key differences between JavaScript and ActionScript 3 Developer Network Создание расширения Введение Этот краткий курс касается построения простейшего расширения для Firefox, которое будет добавлять строку статуса надпись "Hello, World!". Что нужно знать для начала работы Система разработки расширений спроектирована таким образом, что для начала разработки собственного расширения не требуется быть профессиональным программистом. Как бы то ни было, это программирование, поэтому желательно иметь некое представление о принципах работы компьютерных программ вообще и, в частности, быть знакомым с XML. Вообще желательно знание также JavaScript и CSS, однако в этой статье оно вам не понадобится. Создание проекта расширения Расширения состоят из нескольких файлов и для корректной его работы необходимо придерживаться определенных правил их расположения в директориях. /myExtension: /install.rdf /components/* /defaults/ /defaults/preferences/*.js /plugins/* /chrome.manifest /chrome/icons/default/* /chrome/ /chrome/content/ Впрочем, в вашем расширении необязательно должны быть все эти папки.

Related: