Script Summary: Add line numbering to source code. Updated 28-10-2012 13:00 [v2.4.1 Alpha].
Version: v2.4.1 Alpha
Copyright: 2008 - 2012 Jerone
Userscripts.org Source Numbering
$1 News:
Add line numbering to source code.
Second feature of this script is lines selection. Click the line number for selecting the line and the browser will generate an URL.
This script can read these URL's too. For example, if you installed this script and go to this page: http://userscripts.org/scripts/review/38912#line100, the 100e line should be highlighted.
Multiple lines are possible too. As well as using an asterisk (*), which references to the last line.
Besides above features there's a shortcut (Ctrl + g), which will ask which lines you want to highlight. Here also are multiple lines and * possible too.
Have fun using it, gr Jerone
$2 Changelog:
[+] = added; [-] = removed; [/] = fixed; [*] = updated;- 19-12-2008 17:30 [v1 Alpha]:
[+] initial release; - 10-01-2009 19:15 [v1.1 Beta]:
[/] fixed bug in to many lines causing FF to crash;
[/] minor bug fix in numbering width;
[*] updated framework; - 11-01-2009 00:15 [v1.1.1 Beta]:
[/] fixed bug in code; - 15-01-2009 17:00 [v1.2 Beta]:
[+] added maximum lines option;
[/] fixed style;
[*] cleaned up code; - 13-11-2010 23:30 [v1.3 Beta]:
[/] fixed style;
[*] cleaned up code; - 31-01-2011 12:30 [v2.0 Alpha]:
[*] removed US Framework;
[*] clean up code; - 25-02-2011 21:00 [v2.0.1 Alpha]:
[/] fixed minor styles bug; - 25-02-2011 21:15 [v2.0.2 Alpha]:
[/] fixed minor styles bug again (I blame it to the little message saying that highlighting wasn't possible); - 19-03-2011 18:00 [v2.1 Alpha]:
[/] partially fixed compatibility with other script like uso - Syntax Highlight. This script should always execute last. - 27-03-2011 23:00 [v2.2 Alpha]:
[+] added line selecting with location hash support; - 28-03-2011 00:00 [v2.2.1 Alpha]:
[*] clean up; - 29-03-2011 16:00 [v2.3 Alpha]:
[*] removed redundant code;
[+] added shortcut to go to specified lines (Ctrl + g);
[+] implemented "*" as reference to last line (in both hash event and shortcut; - 03-04-2011 20:30 [v2.3.1 Alpha]:
[*] style changes, every 10th row has had a visual change;
[*] compatibility with line numbering from userscript "uso - Count Issues" (http://userscripts.org/scripts/show/69307); - 02-11-2011 15:16 [v2.3.2 Alpha]: [/] fixed wrong highlighting line; [/] fixed use of 0 (will be threated as line 1);
- 24-10-2012 22:30 [v2.4 Alpha]:
[/] fixed removing cdata, because FF stopped supporting EX4; - 28-10-2012 13:00 [v2.4.1 Alpha]:
[/] fixed working on https://userscripts.org;
$3 Feature's:
- Add line numbering to source code.
- Option to maximize number of lines to prevent FF from crashing.
- Doesn't mess with the source field, to keep it compatible with other scripts.
- Excluded from copy-paste.
- Line numbering highlighting. Multiple lines & URL support too.
$4 Screenshots:
$5 Options:
maxLines[Integer]
Maximum number of lines (prevents FF from crashing on to many lines);- http://userscripts.org/scripts/review/38912#line
XXXX[Integer / String "*"]
ReplaceXXXXwith any line number to highlight that line. Using a*as number will return the last line number;- http://userscripts.org/scripts/review/38912#line
- http://userscripts.org/scripts/review/38912#line
XXXX-XXXX[Integer][String "-"][Integer / String "*"]
Replace the first and secondXXXXwith any line number, joined by a-, to highlight a range of lines. Using a*as number will return the last line number;- http://userscripts.org/scripts/review/38912#line
Ctrl + g[Shortcut]
Shortcut for opening box asking which lines you want to highlight;
$6 Todo:
- -
$7 Compatibility Issues
It seems that this script can conflict with some other scripts. Because every script is different, I can only partially fix this compatibility. To completely fix it, you need to set this scripts execution as last. This can be done by right-clicking this script in the GreaseMonkey userscripts list and selecting "Execute last" (see image below). 
$8 Notes:
I made this userscript in Notepad++.It's tested in Firefox 4 with GreaseMonkey 0.9.1.
This script is copyrighted and I prefer if you ask if you can 'borrow' parts of this script.
Installing is at own risk and I can't be held responsible if anything goes wrong.
Want to reward me for putting time and sweat into making this free userscript;
(thank you).


