User:Invitatious/scripts
I occasionally write some JavaScript code. The unsigned changes script was my first script I wrote for Wikipedia, on June 6, 2006.
Unsigned comments script
IMPORTANT — READ THE FOLLOWING BEFORE USING: A script to automatically mark unsigned comments on talk pages. To use, edit the talk page. Click after the unsigned comment, then click the "unsigned2" tab at the top. The script will query Wikipedia for the last 16 users that edited the page the time they edited, and the summary. It will ask you for a single hexadecimal digit corresponding to the edit. Then, it will add this information to the talk page in the form of Template:Unsigned2 at the current cursor position. As this is a semi-automated tool, all changes are the responsibility of the editor. To install, add the code to your monobook.js (I have not tested this with any other skin). All necessary helper functions have already been included. NOTE: If the area below the toolbox turns a metal blue color, the script is using an IE workaround, created by Olliminatore, who has a German Wikipedia version of this script on his German user page. My copy of IE 6 on Windows XP SP2 does not need the workaround, but his does.
Quick installation
Copy the code below into monobook.js.
{{subst:User:Invitatious/US2.js}}
Administrators
To make sure this script is not harmful, check the JavaScript file linked to below, and if you are confident this will not cause harm, copy and paste that code into your monobook.js. Do not use the quick installation above for security reasons. This does not just apply to my script, it applies to all.
Localization
To localize for another language Wikipedia, edit the all the marked localizable strings sections in the file User:Invitatious/unsigned2.js to match that language and unsigned comment template. Put it on a user sub-page on that Wikipedia, along with a description and instructions for installing and using it.
IDEA: make this into a bot
Continuously, the bot would scan the Recent Changes for edits to Talk pages, AfD, etc. The bot will scan these edits for unsigned comments (TODO: How to recognize a signature). For each edit with an unsigned comment, it will add it to a queue to be marked. Every minute, an edit from the queue will be marked with the edit's user and timestamp. Then, when the edit is done, the user will be reminded (if the user is new, and has not been reminded before) to "Sign their posts on talk pages" using Template:Sign1 for accounts and Template:Sign2 for IPs.
Watchlist to wikitext
See my annotated watchlist for the script and a brief description of how to use it. Maybe I'll make this one-liner into something more elegant.
IDEA: add this to MediaWiki
Allow shared watchlists, and the ability to color/initial-code and show on Special:Watchlist.
NEW: Highlight your comments
Using a modified signature, CSS, and JavaScript, you can highlight your comments (or at least the last paragraphs of them).
More scripts coming soon
I will probably write some more scripts.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.