MediaWiki:UploadScript.js: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 84: Line 84:
     table = document.getElementById("mw-htmlform-description").firstChild;
     table = document.getElementById("mw-htmlform-description").firstChild;
    
    
   if (document.getElementById("wpUploadDescription") && document.getElementById("wpUploadDescription").value.length > 0) {
   if (document.getElementById("wpUploadDescription") &&
     //Hold on, there's already text here! Chances are this is the warning page.
      document.getElementById("wpUploadDescription").value != "{{file info\n|summary = \n|game = \n|type = \n|source = \n}}") {
     //Hold on, there's already custom text here! Chances are this is the warning page.
     //Let's just hide the license box and quit.
     //Let's just hide the license box and quit.
     hide_license(table);
     hide_license(table);
Line 158: Line 159:
   add_option("asset", "Raw asset", type_select);
   add_option("asset", "Raw asset", type_select);
   add_option("page", "Book/comic page", type_select);
   add_option("page", "Book/comic page", type_select);
  add_option("document", "Document", type_select);
   add_option("designdoc", "Design documentation", type_select);
   add_option("designdoc", "Design documentation", type_select);
  add_option("document", "PDF document", type_select);
   add_option("audio", "Audio file", type_select);
   add_option("audio", "Audio file", type_select);
   add_option("real", "Real-world image", type_select);
   add_option("real", "Real-world image", type_select);
Line 314: Line 315:
   add_media("Halo: Collateral Damage", comic_select);
   add_media("Halo: Collateral Damage", comic_select);
   add_media("Halo: Lone Wolf", comic_select);
   add_media("Halo: Lone Wolf", comic_select);
   add_media("Halo Graphic Novel", comic_select);
   add_media("Halo Graphic Novel", comic_select, 'selected');
   add_media("Halo: Tales from Slipspace", comic_select);
   add_media("Halo: Tales from Slipspace", comic_select);
   add_media("Other Halo comic/graphic novel", comic_select);
   add_media("Other Halo comic/graphic novel", comic_select);
Line 335: Line 336:
   screenshot_select.onchange = update_fields;
   screenshot_select.onchange = update_fields;
    
    
   add_option("character", "Character or AI unit", screenshot_select);
   add_option("character", "Character or AI", screenshot_select);
  add_option("multiplayer", "Multiplayer content", screenshot_select);
   add_option("weapon", "Weapon", screenshot_select);
   add_option("weapon", "Weapon", screenshot_select);
   add_option("vehicle", "Vehicle", screenshot_select);
   add_option("vehicle", "Vehicle", screenshot_select);
   add_option("menu", "Menu", screenshot_select);
   add_option("menu", "Menu", screenshot_select);
  add_option("multiplayer", "Multiplayer content", screenshot_select);
   add_option("other", "Other", screenshot_select);
   add_option("other", "Other", screenshot_select);
    
    
Line 658: Line 659:
     cur_type == "render" || cur_type == "logo" ||
     cur_type == "render" || cur_type == "logo" ||
     cur_type == "asset" || cur_type == "page" ||
     cur_type == "asset" || cur_type == "page" ||
     cur_type == "document" || cur_type == "designdoc" ||
     cur_type == "designdoc" || cur_type == "document" ||
     cur_type == "audio" || cur_type == "wiki"
     cur_type == "audio" || cur_type == "wiki"
   ) {
   ) {