dtd : describes language and image resources
cd jar
zip -r ../extension.jar .
cd ..
zip extension.xpi itsme.jar chrome.manifest install.rdf
how extensions are installed
Most extensions install themselves by adding skin, locale and content entries to
the mozilla/chrome/installed-chrome.txt
file,
and by adding a .jar file to the mozilla/chrome
directory containing the code for
these entries.
On browser startup mozilla will process the contents of installed-chrome.txt
, and regenerate
the mozilla/chrome/chrome.rdf
file.
Sometimes it is nescesary to manually delete this file, together with the mozilla/chrome/overlayInfo/
directory,
and the components/compreg.dat
and components/xpti.dat
files before startup.
mozilla will rescan the installed components and chrome extensions.
While developing, it is useful to extract the contents of the .jar file, into a directory, and change the registration
in installed-chrome.txt
to use the directory instead of the .jar file.
skin
locale
content
enigmail
installed files
- mozilla/components/ipc.xpt
- mozilla/chrome/enigmail-skin-tbird.jar
- mozilla/chrome/enigmail-skin.jar
- mozilla/chrome/enigmail.jar
- mozilla/defaults/pref/enigmail.js
- mozilla/components/enigmail.js
- mozilla/components/enigmail.xpt
- mozilla/components/enigmime.dll
- mozilla/components/enigmime.xpt
- mozilla/components/enigprefs-service.js
diggler
installed files
- mozilla/chrome/diggler.jar
These extra features I have already implemented:
- increment / decrement url
livehttpheaders
installed files
- mozilla/chrome/icons/default/LiveHTTPHeaders.xpm
- mozilla/chrome/icons/default/LiveHTTPHeaders.ico
- mozilla/components/nsHeaderInfo.js
- mozilla/chrome/livehttpheaders.jar
I would like to add a feature that records all the content in the requests in a directory like this:
root/sitename/path/file/query/
, containing files like this:
timestamp.requestheader
timestamp.requestcontent
timestamp.responseheader
timestamp.responsecontent
the sitename should include the protocol if != http, and the portnr if != default
the query is a optional path element.
these can be implemented by adding an observer for http-on-modify-request events.
problem: It is not yet clear to me how I access the http response content.
how it works
page info
this uses the component/nsHeaderInfo.js component, to add a 'headers' property to
the defaultView property of the document.
the tab in page info is implemented in content/PageInfoOverlay.js
live headers
this is implemented in content/LiveHTTPHeaders.js. An observer is registered for
'http-on-examine-response' events.
I don't think the handler for http-on-modify-request actually serves any purpose.
refspoof
installed files
- mozilla/chrome/refspoof/content/spoof.rdf
- mozilla/chrome/refspoof/content/contents.rdf
- mozilla/chrome/refspoof/content/refspoof_overlay.xul
- mozilla/chrome/refspoof/content/refspoof_overlay.js
I would like to see these extra features implemented:
- add an option to automatically override the referer for certain sites.
- add an option to always set the referer.
both these can be implemented by adding an observer for http-on-modify-request events.
these extra features I have already implemented:
- context menu - open with url=referer
- context menu - open in google
- context menu - open in archive.org
useragentswitcher
installed files
- mozilla/chrome/useragentswitcher.jar
electrix
installed files
- mozilla/chrome/electrix-0.3.jar
jslib
installed files
flashplayer
installed files
- mozilla/components/flashplayer.xpt
- mozilla/plugins/NPSWF32.dll
plugins that I want
- edit cookies for current site
- specify 'X-Forwarded-For' and 'Client-IP' and 'Via' http headers.
- extend the 'find-in-page' functionality, with
- highlighting search terms
- add regular expression search
- add word search
- show diffs to page since previous visit.
- record certain properties of a page at every visit, so stats can
be gathered, without having to write a bot for this.
a rightmouse button menu entry should be added to add selected
elements to the logging expression.
the logging expression consists of conditions, which must be met.
like the url equals, or matches a pattern, and certain page elements
which must equal or match a pattern.
plus the references to the page element which must be recorded.
need a xpath like way of refering to page elements.
- referer related
- add an option to automatically override the referer for certain sites.
- add an option to always set the referer.
- I would like to add a feature that records all the content in the requests in a directory like this:
root/sitename/path/file/query/
, containing files like this:
timestamp.requestheader
timestamp.requestcontent
timestamp.responseheader
timestamp.responsecontent
the sitename should include the protocol if != http, and the portnr if != default
the query is a optional path element.
this can probably be done using window.addEventListener("load", myhandler, true);
- a plugin that allows you to modify form values before the actual post or get is executed.
- a plugin that allows you to convert your attachments to one zipped file.
optionally zip-encrypted, to prevent mailfilters from blocking exes
- a plugin that removes the 'you stupid user are not capable of knowing whether you can run .exe files' option.
find in page
comm/content/navigator/navigatorOverlay.xul defines the function 'BrowserFind' as the
action for the 'view-find' menu entry, and the ctrl-f key.
comm/content/navigator/browser.js function BrowserFind calls findUtils.js - function findInPage
comm/content/communicator/findUtils.js contains the code to launch the find dialog.
toolkit/content/global/finddialog.xul and toolkit/content/global/finddialog.js
contain the code for the find dialog.
find data is saved/restored from nsIFindService["@mozilla.org/find/find_service;1"].
find is executed using nsIWebBrowserFind, this is implemented in toolkit/content/global/bindings/browser.xml : webBrowserFind
this interface is implemented in find.xpt
calling xpcom from web pages
enable the UniversalXPConnect
privilege, to be able to call all xpcom
objects:
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
and then you can for instance write stuff to the javascript console as follows:
var jsConsoleService = Components.classes['@mozilla.org/consoleservice;1'].getService();
jsConsoleService.QueryInterface(Components.interfaces.nsIConsoleService);
jsConsoleService.logStringMessage('this appears on the js-console.')