User:Ohconfucius/script/formatgeneral
Appearance
Preamble
- Within-article consistency of formatting
By long-standing convention and as detailed at the Manual of Style, a Wikipedia article needs to use consistent formatting. Because there are a number of external style conventions that exist, articles are vulnerable to creeping inconsistency through being edited potentially by hundreds of editors. These inconsistencies are often difficult to identify quickly, and this script has been developed as an aid to the careful manual oversight of consensus formatting rules.
Functions
Functions performed include:
- superscripted ordinals
- Celsius spelling errors
- Convert &sup to superscript
- Convert degree symbols into ° symbol, ensure preceding space
- add missing space between wikilinks
- Celsius or Fahrenheit
- Fix common naming error (be careful with this one)
- full stop and nbsp fixes
- hash fixes
- improper capitalisation within section headings
- other improper capitalisation
- rem bolding from linked AND bolded terms
- rem leading and lagging spaces within wikilinks
- rem linked copyright symbol
- rem linking within section headings
- rem redundant spaces and punctuation
- remove commas from numerical values in convert template
- remove flagicons from birth and death
- remove leading zeros from convert template
- Remove surprise or 'Easter egg' diversions linking unit name to orders of magnitude articles
- symbol for 'times' and dashes
- turn letter 'x' into symbol '×'
Installing the script
- Assuming that you are now using the new skin... Open/create your vector.js page by clicking on this link.
- Alternatively, go to your user page and append '/vector.js' to the end of the URL.
- If you are still using the old skin, open/create your monobook.js page, by clicking on this link.
- If you make a straight copy of this script, instead of "importing" it, you may not benefit from the enhancements and bug-fixes that are made from time to time. In the latter case, you may choose to watchlist this page so you will know when to update your cache for modifications to this script.
- Alternatively, go to your user page and append '/vector.js' to the end of the URL.
- Copy the following command onto your vector.js or monobook.js page:
importScript('User:Ohconfucius/script/formatgeneral.js'); //[[User:Ohconfucius/script/formatgeneral.js]]
- Save the page and (re-)load it – refresh the cache by following the instructions at the top of your vector.js or monobook.js page.
- Bookmark the script page. This will be your cue to to purge the cache on your browser for any updates to take effect.
Disclaimer: Use at your own risk and make sure you check the edit changes before you save.