FANDOM


<form id="new_team"> 隊伍名:<input type="text" id="team_name" /> 關卡名:<input type="text" id="stage_name" disabled="disabled" />
若數值為最大,請不要填寫

編號等級技能回合數昇華等級
隊長 <input type="number" data-id="id1" min="1" max="9999" required="required" /> <input type="number" data-id="lv1" min="1" max="99" /> <input type="number" data-id="cd1" min="1" max="50" /> <input type="number" data-id="ref1" min="1" max="4" />
隊員1 <input type="number" data-id="id2" min="1" max="9999" /> <input type="number" data-id="lv2" min="1" max="99" /> <input type="number" data-id="cd2" min="1" max="50" /> <input type="number" data-id="ref2" min="1" max="4" />
隊員2 <input type="number" data-id="id2" min="1" max="9999" /> <input type="number" data-id="lv3" min="1" max="99" /> <input type="number" data-id="cd3" min="1" max="50" /> <input type="number" data-id="ref3" min="1" max="4" />
隊員3 <input type="number" data-id="id2" min="1" max="9999" /> <input type="number" data-id="lv4" min="1" max="99" /> <input type="number" data-id="cd4" min="1" max="50" /> <input type="number" data-id="ref4" min="1" max="4" />
隊員4 <input type="number" data-id="id2" min="1" max="9999" /> <input type="number" data-id="lv5" min="1" max="99" /> <input type="number" data-id="cd5" min="1" max="50" /> <input type="number" data-id="ref5" min="1" max="4" />
隊友 <input type="number" data-id="id6" min="1" max="9999" required="required" /> <input type="number" data-id="lv6" min="1" max="99" /> <input type="number" data-id="cd6" min="1" max="50" /> <input type="number" data-id="ref6" min="1" max="4" />

完整通關攻略 <textarea id="attack_method" style="resize:none;width:300px;height:200px;"></textarea>
<input type="submit" /> </form> <script> (function NewTeam(){ if(typeof jQuery == "undefined") { setTimeout(NewTeam, 100); return; }

if(typeof mw == "undefined") { setTimeout(NewTeam, 100); return; }

function submit(title, text, func) { $.post( "http://zh.tos.wikia.com/api.php", { action: 'edit', appendtext: text, title: title + '/通關技巧及參考隊伍', token: mw.user.tokens.get('editToken'), format: 'json' }, func, 'json' ); }

function numberString(number) { number = parseInt(number + ); if(number < 10) { return '00' + number; } else if (number < 100) { return '0' + number; } else { return + number; } }

$('#stage_name').val((wgPageName.split('/'))[0]);

$('#new_team').on('submit', function(e){ e.preventDefault(); var all = $('#new_team_table input'); var text=decodeURI('%7B%7BRanks|size=700|title=') + $('#team_name').val();

for(var i = 0; i < all.length; i++) { if(all.eq(Math.floor((i)/4)*4).val() == ) continue; if(all.eq(i).val() == ) continue; text += ('|' + all.eq(i).data('id') + '=' + ((i%4==0)?numberString(all.eq(i).val()):all.eq(i).val())); }

text += ('|explain=' + $('#attack_method').val().replace(/\n/g,'
') + '
~~' + '~~' + decodeURI('%7D%7D') + '\n'); /*alert(text);*/ submit($('#stage_name').val(), text, function (data) { debugger; }); });

})(); </script>

除了特别提示,社区内容遵循CC-BY-SA 授权许可。