MediaWiki:Common.js/edit.js: Difference between revisions
Jump to navigation
Jump to search
imported>Dinoguy1000 |
imported>Dinoguy1000 |
(No difference)
| |
Revision as of 00:33, 7 December 2010
/* <syntaxhighlight lang="javascript"> */
//fix edit summary prompt for undo
//this code fixes the fact that the undo function combined with the "no edit summary prompter" causes problems if leaving the
//edit summary unchanged
//this was added by [[User:Deskana]], code by [[User:Tra]]
//see bug 8912
addOnloadHook(function () {
if (document.location.search.indexOf("undo=") != -1
&& document.getElementsByName('wpAutoSummary')[0]) {
document.getElementsByName('wpAutoSummary')[0].value='1';
}
})
// Turn on spellchecking in the edit summary field, for Firefox.
// Temporary until [[bugzilla:21604]] is deployed
addOnloadHook( function() {
var wpSummary = document.getElementById( "wpSummary" );
if ( wpSummary && typeof wpSummary.spellcheck != undefined )
wpSummary.spellcheck = true;
} );
/* Remove when http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65899 is deployed */
if( wgPageName == "Special:Upload" && getURLParamValue( "wpForReUpload") == "1" ) {
appendCSS( "tr.mw-htmlform-field-Licenses {display:none;}" );
}
//</syntaxhighlight>