Jump to content

User:The Evil IP address/liedit

From Wikipedia, the free encyclopedia

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
  • 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:
  • 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
  • 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 included from infoboxes or templates
    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
    }}
    • Noel-Baker, Philip (1925). The Geneva Protocol for the Pacific Settlement of International Disputes. London: P. S. King & Son Ltd.
    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>
    
    • Hello, what's up
      • Blubb
    • Guten Tag!
    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]
    • add an option to add/remove list items?

    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.