User:Nux/Code Cleanup

The idea of the Code Clean up project is to automatically change wikicode so it can be changed more easily by humans :). Code clean up project was founded in early 2007 on Polish Wikipedia.

Script for normal users
A script written in JavaScript is available for any logged in user of English Wikipedia. This script should be used for normal work on wiki. To add a button for clean up you need to install the script and set a variable that tells the script to add a button to your toolbar.

Author's notes

 * License: GNU General Public License v2
 * Author: Maciej 'Nux' Jaros (discussion).
 * The script: User:Nux/wp_sk.js
 * Code to insert on manual installation:

Special thanks to:
 * ABach - za zebranie i opracowanie długiej listy elementów do sprzątania
 * Malarz pl - za garść kolejnych elementów do sprzątania
 * BartekChom - za pomysły i gotowe wyrażenia regularne
 * Gregul - za garść wyrażeń regularnych
 * PMG - za wytrwałe i szczegółowe testowanie
 * ToSter - za testy i pomysły na nowe rozwiązania

Additional settings
Settings should be added to your monobook above the code inserted upon installing manually.

Example code to insert inside your monobook (button and redirects replacement enabled):

The script can be (theoretically) used in a different way then by pushing a button - in can be a part of a bigger script. And so if you will not insert any settings the button will not be visible.
 * Show the button

Adding this setting, will make the script look for replacements of redirects after you will use the preview button (or you have enabled preview on your first edit).
 * Redirects replacement

If any redirects were found in the preview, then a loading icon will appear. After this will be finished, the loading icon will disappear and a small "#R" will appear on the clean up button. Pushing the clean up button with "#R" will start the process of replacing redirects along with normal clean up process.

Currently redirects are only checked when the preview for an article is visible. Note that you can enable preview on your first edit - you just need to set an option on your preference page ("Edit" tab → "").

Special setting for advanced users. You will also need a special debugging function to use this - you can get more info from the author.
 * Debug

pl:WP:SK