MediaWiki:Sandbox.js: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 2: Line 2:
*  This is a sandbox.
*  This is a sandbox.
*/
*/
$(function () {
  var pkmn = {
    "Bulbasaur": { ja: "フシギダネ", type1: "Grass", type2: "Poison"},
    "Ivysaur": { ja: "フシギソウ", type1: "Grass", type2: "Poison" },
    "Venusaur": { ja: "フシギバナ", type1: "Grass", type2: "Poison" }
  };
  var name = $('#name').text();
  $.each(pkmn, function(key, value) {
    if (key == name) {
      $('#ja').text(value.ja);
      $('#type1').html('{{TypePKMN|' + value.type1 + '}}');
      if (value.type2) {
        $('#type2').html('{{TypePKMN|' + value.type2 + '}}');
      }
    }
  });
});

Latest revision as of 19:07, 24 May 2023

/* 
*  This is a sandbox.
*/