User talk:MECU/br.js
Appearance
A similar script, CodeFixer (obsolete too), instead use the AutoEd, is now functional. In addition to fixing BRs, it cleans up other common syntax errors. There are some other minor functionality differences, so feel free to choose which script you'd like to use. |
Information
[edit]- What does this do?
- It changes all the
<BR>
(and other possible ways of it, ie<BR />
) to the proper XHTML form:<br />
- Why?
- It's a pet peeve of mine. But it's also more correct than the ways it replaces, as each HTML tag should be closed, and single use tags like this (and
<reference />
, for example) have to be closed in this unique way and lower case is more correct. This is because Wikipedia uses the Doctype<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- How do I use it?
- After installation, when editing a page, just click the "<br>" tab at the top of the page near "watch"
- Why don't you fix all the common XHTML errors then?
- Because it would require much more complex coding, and this is a first step. If anyone would like to develop this, I would be happy to help or assist or beta test it. Contact me on my user talk page.
Version Information
[edit]- 1.3 - March 24, 2007
- Add for case
<BR/ >
- Add for case
- 1.2 - March 13, 2007
- Add for case
</BR>
- Add for case
- 1.1 - January 17, 2007
- addLink() -> addPortletLink()
- Updated installation directions below
- 1.0 - December 27, 2006
Installation
[edit]To install, copy the following into your monobook.js:
/**** MECU's BR fixer ****/ document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/enwiki/w/index.php?title=User:MECU/br.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); /* This is to keep track of who is using this extension: [[User:Mecu/br.js]] */ /**** End MECU's BR fixer ****/
Broken
[edit]This doesn't seem to work anymore. --Closedmouth (talk) 12:34, 23 January 2009 (UTC)
Legacy JavaScript
[edit]Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook( ... )
needs to be replaced with $( ... )
or $( function() { ... } )
(depending on use); all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' )
; and addPortletLink
needs to be called with mw.util.addPortletLink
. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. — {{U|Technical 13}} (e • t • c)
21:43, 19 January 2015 (UTC)