User:BrandonXLF/TodoList
Appearance
Description | Adds a todo list Todo List adds a todo list to Wikipedia (or any other MediaWiki wiki). Adds a link to the head to access your todo list. Pressing the link will open a popup that will allow you to add to your todo list, view your todo list and modify your todo list. |
---|---|
Author(s) | User:BrandonXLF |
Status | Working |
First released | November 11, 2019 |
Skins | All |
Source | TodoList.js (git) |
GitHub repository | wikipedia-user-scripts |
Todo List adds a todo list to Wikipedia (or any other MediaWiki wiki). Adds a link to the head to access your todo list. Pressing the link will open a popup that will allow you to add to your todo list, view your todo list and modify your todo list.
Installation
importScript('User:BrandonXLF/TodoList.js'); // [[User:BrandonXLF/TodoList.js]]
- Alternatively, use the following instead of the above:
mw.loader.load('/w/index.php?title=User:BrandonXLF/TodoList.js&action=raw&ctype=text/javascript'); // [[User:BrandonXLF/TodoList.js]]
- To install on other wikis (for instance, globally in your global.js on the Meta-Wiki), use the following code:
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/TodoList.js&action=raw&ctype=text/javascript');
- After installing reload the page and clear your cache
Help
Adding and editing items
- Page name or URL: A page name or any valid URL. Examples:
Main Page
,://www.example.com
, andhttps://example.com Example
. - Comment: An additional comment.
Notes
- A valid URL must start with
https://
,http://
or://
or else it will be treated as a page name. Page names will by automatically be converted to a link to the wiki article with that title. - If the URL contains a space, the text after the space will be used as the display text. For example,
https://example.com Example
will show up asExample
since URLs cannot contain spaces. Spaces can be represented as%20
,_
or+
. - Page names cannot be be displayed differently than the page name. If you desire to display the name differently, use the URL of the page followed by your desired display text instead.
- Page name and Comment are optional, but at least one is required.
Managing and deleting items
Global
- Redo and Undo: Redo and undo changes. You should not expect to be able to undo all changes. Changes including uploading a todo list, deleting an item, reordering items, deleting the todo list, editing an item, redoing a change, and adding an item. Redo will redo the last undone change. Once you reload the editor, all change history is lost.
- Clear: Delete your entire todo list, this should be able to be undone, but don't rely on it. Once you reload the editor, this action cannot be undone.
- Download: Download all items currently in the todo list as a JSON file. The file can later to uploaded again the replace the current todo list. Do not edit the JSON file unless you understand the risks associated with doing so and you understand the structure of the file.
- Upload: Upload a todo list JSON file. The new list will replace the current list. The operation should be able to be undone. Only upload a file created by the download file button, or else you may cause issues with the script, causing it to become non functional.
Item specific
- Drag: Drag to change the position of the item.
- Delete: Delete an item.
- Edit: Edit an item (page name & comment)
- More information: View more information about an item, such as the date it was added.
Saving changes
- All changes are synced with the API after an action is performed (saving, deleting, dragging etc.).
- When a change is being saved the text "Saving changes..." should appear at the end of the list. Do not leave the page or close the popup until the text disappears as this may cause changes to not be saved.
Comments/Bugs
Comments are welcome on my talk page, be sure to indicate that you're talking about this script in the title. I would really like any suggestion to make the script run better.