Follow these rules when adding new code or editing:

* Use meaningful names for files in the src/ directory. Examine the
  names of the existing files and notice that there are some patterns.

* Use the prefix "lm_" for every file in the src/ directory. 

* Avoid lines longer than 80 or even 75 columns. There are people that
  still read in 80x25 terminal. If you need to split a string use the
  concatenation symbol "+" in JavaScript.

* Add a comment, if something is not obvious. Experience with the
  project so far shows that even obvious things are forgotten after
  few days or a week.

* Add an empty new line at the end of every source file. The build
  system will detect files without new line at the end, and will not
  continue. When merged such files break the syntax in the userscript.

* Use meaningful names for functions, methods and variables. It is
  better when the variable or the function hints what it does or what
  is it for.

* Use one-line commenting style, with at least one space after the
  comment symbol:

  	  The regular expression "//.*" matches (parts of) URLs too.
	  It is not an option for stripping comments.  Use the format
	  bellow for comments instead.

	  Format: 
	  	  //\s+Commented text
	  	  // Commented text
	  	  //   Another comment with several spaces
		  //	<TAB> is OK

	The build system will detect invalid comments and will refuse
	to build.

* Use one-line  comments for CSS files:

         /* This is a comment */
	 /* This is a longer comment  */
	 /* that continues on the next line. */

	 /* Do not use 
	     this style for comments in CSS files
	 */

	 Currently the build system will not detect the last comment
	 as invalid, but will not strip it correctly and this will
	 break the generated userscript.

* Add !important after every CSS rule. Applies for style attributes
  too.

* When adding images with url('some-file') in style sheets add just
  the file name without a path. The image file should be placed in the
  same directory as the CSS template. The build system generates
  JavaScript code from images and style sheets.

* Copyrights for data files should be listed in the COPYING.data-files
  file.

* If the data file format supports embedded comments, add a copyright
  notice. For example type:
      * $ less  "data/linterna mágica - interface.svg"
      * $ vorbiscomment  "data/linterna mágica - pronounce.ogg"

   to see the embedded copyright notice.

* The list of the copyright holders in the userscript header and in
  the LinternaMagica.prototype.copyrights array is generated
  automatically by examining the source code files and the README
  file. Just add your name in the files you are editing or creating.

* Do NOT add code that works only in one browser.

* Do NOT use the Greasemonkey API. Browsers that have their own
  implementation for userscripts should work too.

* When adding site specific support or changing regular expressions to
  support new site, make sure that Linterna Mágica works with or
  without Gnash or Swfdec. For some sites this means dual detection -
  by parsing scripts and by detecting DOM objects.

* Avoid writing code that depends on execution of JavaScript code
  provided by the web site. In most cases this code is not free (as in
  freedom) software. Currently Linterna Mágica does not work when the
  NoScript extension for GNU IceCat and other versions of Firefox is
  installed, but that might change in the future.

* Make sure that newly added code works when the Flashblock extension
  is installed.

* Do not write code that depends on cookies being enabled/disabled. Do
  not use cookies at all to store some data.

* Links, scripts and other objects that point to (or get data from)
  the web site of Linterna Mágica, should be wrapped inside an
  <object> with data URI scheme. This will not send referrer. Respect
  the user's privacy. Examine the code in src/lm_about.js and
  src/check_for_updates.js to see how.

* Do not use console.log or anything else from the console object for
  logging. This might break the code if the object is not defined. For
  example GNU IceCat without Firebug installed. Use the internal log
  method (LinternaMagica.prototype.log/this.log) instead. 

* When using the internal log method add the method that is calling
  it. The methods of the LinternaMagica object are anonymous functions
  and the name can not be retrieved automatically.

* Avoid site specific regular expressions, when possible.

* Do not expect that the object detection and link extraction process
  is linear. Everything could happen in every moment. For example:
     * warnings for flash version generated by the site deleting the
        object created by Linterna Mágica
     * background (XHR) requests
     * object inserted some time after the page loaded

* When adding new code test at least in two web sites and browsers.

This file is part of  Linterna Mágica

	Copyright (C) 2011  Ivaylo Valkov <ivaylo@e-valkov.org>

Linterna Mágica is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Linterna Mágica is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Linterna Mágica.  If not, see <http://www.gnu.org/licenses/>.