A.allison/Upload form common.js changes

Revision as of 13:03, 21 August 2010 by A.allison (talk | contribs) (Created page with "Content removed from Mediawiki:Common.js that prior to version 1.16 inserted the information template into the upload description. <syntaxhighlight ...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

Content removed from Mediawiki:Common.js that prior to version 1.16 inserted the information template into the upload description.

<syntaxhighlight lang="javascript"> // // Insert a personalized Texttemplate into the Special:Upload edit box. // function delayedUpdateSpecialUpload(){ var editbox = document.getElementById('wpUploadDescription');

if (location.href == "http://wikivet.net/index.php/Special:Upload"){

editbox.value = "{"+"{Information\n"
               + "|Description=\n"
               + "|Source=\n"
               + "|Date=\n"
               + "|Author=\n"
               + "|Permission=See below\n"
               + "|Other_versions=\n"
               + "}"+"}\n\n";
}

if (location.href == "http://wikivet.net/index.php?title=Special:Upload&uselang=own"){

editbox.value = "{"+"{Information\n"

              + "|Description=\n"
              + "|Source=Own Work\n"
              + "|Date=" + window.location.pathname + "\n"
              + "|Author=" + "\[\[User:" + wgUserName + "|" + wgUserName + "\]\]" + "\n"
              + "|Permission=See below\n"
              + "}"+"}\n\n";
}

if (window.location.pathname == "/index.php"){

editbox.value = "{"+"{Information\n"

              + "|Description=\n"
              + "|Source=\n"
              + "|Date=\n"
              + "|Author=\n"
              + "|Permission=See below\n"
              + "}"+"}\n\n";
}

} addOnloadHook(delayedUpdateSpecialUpload); </syntaxhighlight>