Userscripts.org TOC

By jerone Last update Nov 21, 2008 — Installed 94 times.
Script Summary:
Add a TOC for Userscripts.org metadata. Updated 21-11-2008 21:00 [v1.5.1 Beta].
Recently Updated TopicsPosts
Archived Comments8

this script has 1 topic, 8 posts

This script has no reviews.


Userscripts.org TOC

$1 News:

This script adds a simple TOC to the metadata. All headers (from 1 to 6) are listed in this TOC. Clicking on one of the links scrolls you down to that header.

In the latest version the TOC is improved and numbering is added. You can even add your own custom numbering (read more below).

This is still a beta version, and I'm not sure if all works for everybody. So please leave a comment if all works or not!

NOTE: this script does NOT work without my userscript framework, US_framework, which consist of:

Have fun using it, gr Jerone

$2 Changelog:

[+] = added; [-] = removed; [/] = fixed; [*] = updated;
  • 03-09-2008 14:00 [v1 Alpha]:
    [+] initial release;
  • 05-09-2008 12:00 [v1.1 Beta]:
    [+] option to choose position;
  • 07-09-2008 15:15 [v1.2 Beta]:
    [/] problem with padding/margin for the list;
  • 08-09-2008 10:30 [v1.3 Beta]:
    [+] option to hide when no headers;
  • 11-09-2008 11:45 [v1.4 Beta]:
    [*] improved element finding;
    [+] multiple levels indent;
    [+] support for levels 5 and 6;
    [+] TOC removed on print;
  • 24-09-2008 13:00 [v1.5 Beta]:
    [+] added numbering + custom numbering;
    [/] use only headers with text;
    [*] links are trimmed;
    [*] updated layout;
  • 21-11-2008 21:00 [v1.5.1 Beta]:
    [/] fixed small bug in framework check;

$3 Feature's:

  • Add a TOC for Userscripts.org metadata.

$4 Screenshot:

Userscripts.org TOC screenshot

$5 Options:

tocPosition
[Integer] float position: 0=whole screen, 1=left, 2=right;
hideNone
[Boolean] hide when there are no headers;
showNumbering
[Boolean] add numbering;
customNrs
[Function] use custom numbering (parameter "n" is an Array with all numbering, starting with 1);
This function can be used if you prefer for example Roman numbering or just symbols;

$6 Todo:

  • Internet Explorer (IE7Pro) and Opera (UserJS) compatible.

$7 Test:

These are all supported headers:


Test header 1 <h1>

Test header 2 <h2>

Test header 3 <h3>

Test header 4 <h4>

Test header 5 <h5>
Test header 6 <h6>

$8 Notes:

I made this userscript in Dreamweaver 8.
It's tested in Firefox 2 (partly) and Firefox 3.0.4 (continuous) with GreaseMonkey 0.8.
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).