I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Saturday, 30 June 2012

Useful to open firefox files under cygwin

I use cygwin extensively under windows. So I often need to open urls in firefox or in some other client. I finally found a was to implement this with simple alias and a bash function. It took me sometimes, but I guess or hope I learnt some thing.

You only need to put this in the .bashrc file or equivalent.

alias firefox='defCommand "/cygdrive/c/Program\ Files\ \(x86\)/Mozilla\
Firefox/firefox.exe"'

function defCommand(){
  PARAM=`cygpath -m $2`
  NEW_COMMAND="$1 file:$PARAM";
  eval $NEW_COMMAND
}

Friday, 26 September 2008

Firefox Plugins

There are a number of useful firefox add-ons:
No Script
an add on to control easily whether scripts (java, javascript, flash) are allowed to be performed. This is a per domain enabling or not.
Download Them All
with this add on, it easier to download many resources from a web page
Download Status Bar
adds a status bar which shows the status of downloading of things from firefox.
Greasemonkey
using greasemonkey allows to write scripts to be performed on top of web pages
Firebug
This is a utility to help in developing javascripts.

Wednesday, 20 February 2008

Firefox extensions

I have been fooling around with firefox extensions and tried one of my own. There are a few easy things to remember: create a chrome directory with the following structure:
  • chrome ->
    • content ->
      • - extensionname.js
      • - extensionname.xul
      • - overlay.xul
    • locale->
      • en-US->
        • - extensionname.dtd
        • - extensionname.properties
        • - overlay.dtd
      • skins->
  • components->
  • defaults->
    • preferences->
  • - chrome.manifest
  • - install.rdf
Here is a little summary of the purpose of all these files: - the content directory contains the core of the extension, an overlay.xul file which defines some modifications to an existing xul file. The extensionname.xul file contains a xul file for the visualisation of the application, and the extensionname.js contains javascript code used for interaction purposes - the locale contains dtd and property files for the possible localisation of the extension. For each possibility, there is a directory with the name of the locale. The dtd are used for xul files, while the properties files are for javascript files. - the defaults directory is used for things related with the user profile, - while the components contains possible XPCOM components. Finally, install.rdf gives some information about the extension, while the manifest file chrome.manifest indicates on which xul file the overlay is applied and the place where the extension is to be found. To simplify the work, I use a templating method to generate extensions from some definition files. To package the extension once the install.rdf and the manifest file have been correctly edited, you only need to zip it with an ".xpi" as file extension.