User:The Evil IP address/liedit

The List item editor allows for one-click editing of most asterics list items (those using  HTML formatting) w/o having to open the edit form for either the whole page or the section. You can change the list item on the fly and then keep on reading the article.

Usage
Copy the following to your common.js:

The script has been tested for the Vector skin.

To use it, make a left-mouse click on a list item and–ideally–within seconds an input box w/ the formatting of the section title will appear. Change it, press "Save" or press "Cancel" if you don't need to make any changes.

If the list item contains a clickable internal or external link, click either on a non-link part of the list item (if available) or on the bullet. This will open the edit form then.

The script supports editing almost all list items using an asterics at the beginning of a line and ending on the same line, e.g. see also sections. It also supports list items using the  HTML tag that end on the same line.

Possibilities
The script uses a parser to find out which line in the wikitext is the list item we clicked on. This tool is stable and working for the vast majority of use cases. It supports the following use cases:

Blheloo Hallo Ja Nein Ja
 * Plain and simple lists using wiki-syntax
 * Perry House, Corner Albert & Elizabeth Streets, Brisbane
 * E.S. & A. Bank, Eagle Street, Brisbane
 * Carlton Club Hotel, Queen Street, Brisbane (Alterations and Additions)
 * Parbury House, Eagle Street, Brisbane (Supervision)(Alterations and Additions)
 * Exton & Co. Ltd., 333 Ann Street, Brisbane (Alterations and Additions)
 * Preston House, Corner Queen Street and Eagle Lane, Brisbane
 * Jenyns House, 327 George Street, Brisbane
 * Robert Reid’s Building, Corner Edward & Charlotte Streets, Brisbane
 * B. A. F. S. Dispensary, 331-333 George Street, Brisbane
 * Hide & Skin Store, J. W. H. Turner & Co., Corner Longland & Master Streets, Bulimba
 * Nested lists using wiki syntax
 * 1988:
 * Nominated for "Best Writer" Eisner Award, for Grendel
 * Won an Inkpot Award
 * 1993:
 * Won "Best Finite Series/Limited Series" Eisner Award, for Grendel: War Child
 * Nominated for "Best Writer/Artist" Eisner Award, for Batman: Legends of the Dark Knight: "Faces"
 * Nominated for "Best Cover Artist" Eisner Award, for Batman: Legends of the Dark Knight: "Faces"
 * Nominated for "Best Inker" Eisner Award, for Grendel: War Child
 * 1995: Nominated for "Best Writer" Eisner Award, for Sandman Mystery Theatre
 * 1999:
 * Won "Best Anthology" Eisner Award, for Grendel: Black, White, and Red
 * Won "Best Short Story" Eisner Award, for "Devil's Advocate" in Grendel: Black, White, and Red #1
 * Nominated for "Best Writer" Eisner Award, for Grendel: Black, White, and Red
 * Simple lists using HTML formatting

Current known limitations
A few possibilities of list items are currently not supported, as I haven't gotten around how to effectively parse them. Finding out to which portion of the wikitext the list item we clicked on refers to is a non-trivial task. All the script is working with is a simple  element in the HTML document and the MediaWiki API, which enables this basic parsing. It does not have a clear, unique mapping to the line (or template, in some cases) in the wikitext.

If one of them appears in a section, very likely all items below them cannot be correctly identified either. Note that those use cases are rare. * (A book about the agreement by David Hunter Miller) (A book about the agreement by David Hunter Miller)  Hello, what's up  Blubb   Guten Tag!  <ul> <li>Hello, what's up <ul> <li>Blubb</li> </ul> </li> <li>Guten Tag!</li> </ul> <li>Gram
 * List items included from infoboxes or templates
 * List items spread over multiple lines
 * Templates not including the asterics
 * Templates not including the asterics
 * Nested list items using HTML formatting (does anyone do this even?)
 * List items using HTML spread over multiple lines (ditto)

Ja </li> <li>Gram

Ja </li>

If you notice another case in which the script is not working as expected, please do let me know on my talk page, so I may have a look at it and see what I can do about it.
 * Any other?

To do

 * add an option to add/remove list items?

Bugs/Feedback
This script is far from finished. If you have encountered any bug while using it, or you have any suggestions on how to make it better, please let me know on my talk page. Thank you.