The List item editor allows for one-click editing of most asterics list items (those using <ul> 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

[edit]

Copy the following to your common.js:

((subst:iusc|User:The Evil IP address/liedit.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 <li> HTML tag that end on the same line.

Possibilities

[edit]

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:

Plain and simple lists using wiki-syntax
Nested lists using wiki syntax
Simple lists using HTML formatting
  • Blheloo
  • Hallo
  • Ja
  • Nein
  • Ja
  • Current known limitations

    [edit]

    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 <li> 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.

    List items spread over multiple lines
    *((cite book
      | last = Noel-Baker
      | first = Philip
      | title = The Geneva Protocol for the Pacific Settlement of International Disputes
      | location = London
      | publisher = P. S. King & Son Ltd
      | year = 1925
    ))
    Templates not including the asterics
    ((Gutenberg|no=28950|name=The Geneva Protocol)) (A book about the agreement by [[David Hunter Miller]])
    
    Nested list items using HTML formatting (does anyone do this even?)
    <ul>
    <li>Hello, what's up <ul>
    <li>Blubb</li>
    </ul>
    </li>
    <li>Guten Tag!</li>
    </ul>
    
    List items using HTML spread over multiple lines (ditto)
    <li>Gram
    
    Ja
    </li>
    
  • Gram Ja
  • Any other?

    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.

    To do

    [edit]

    Bugs/Feedback

    [edit]

    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.