日刊カルチョビットweb 選手ステータスコピペ用テキスト生成
by
AirReader
2012-07-19 [2012/07/19 01:11:23]
日刊カルチョビットwebの個人チームページで利用すると同ページにコピペ用テーブルを生成します
@@ -85,10 +85,6 @@
}
var starting = statusSelector($(this).attr('class'));
var position = statusSelector($(this).children().eq(0).children('img').attr('src'));
- //var playerNumber1 = $(this).children().eq(1).children('div.playerNumber2').children().eq(0).attr('alt');
- //var playerNumber2 = $(this).children().eq(1).children('div.playerNumber2').children().eq(1).attr('alt');
- //var playerNumber = '"'playerNumber1'"' + '"'playerNumber2'"';
- console.log(playerNumber);
var playerName = $(this).children('.playerName').text();
if (playerName.length == 0){
playerName = '選手';
/*
* @title 日刊カルチョビットweb 選手ステータスコピペ用テキスト生成
* @description 日刊カルチョビットwebの個人チームページで利用すると同ページにコピペ用テーブルを生成します
* @include http://calciobit.nintendo.co.jp/club/detail.php?team_code=*
* @license MIT License
* @require
*/
$('#BottomSub').append('<h2>コピペ用</h2><div class="MiddleBox"><div class="MiddleBoxInner"><div id="copyStatus"><table><tbody id="copyStatusTbody"></tbody></table></div></div></div>');
$('.SubL > table > tbody > tr').each(function(){
function statusSelector(v){
switch(v){
case 'BgStarting01' :
case 'BgStarting02' :
return 'スタメン';
case 'BgReserve01' :
case 'BgReserve02' :
return '控え';
case '/club/files/images/position_gk.gif' :
return 'GK'
case '/club/files/images/position_df.gif' :
return 'DF';
case '/club/files/images/position_mf.gif' :
return 'MF';
case '/club/files/images/position_fw.gif' :
return 'FW';
case '/club/files/images/ico_s.png' :
return 'S';
case '/club/files/images/ico_a.png' :
return 'A';
case '/club/files/images/ico_b.png' :
return 'B';
case '/club/files/images/ico_c.png' :
return 'C';
case '/club/files/images/ico_d.png' :
return 'D';
case '/club/files/images/ico_e.png' :
return 'E';
case '/files/images/common/ico_type_0.gif' :
return 'バランス';
case '/files/images/common/ico_type_1.gif' :
return 'ダイナモ';
case '/files/images/common/ico_type_2.gif' :
return 'オールラウンド';
case '/files/images/common/ico_type_3.gif' :
return 'リベロ';
case '/files/images/common/ico_type_4.gif' :
return 'ストッパー';
case '/files/images/common/ico_type_5.gif' :
return 'バックアップ';
case '/files/images/common/ico_type_6.gif' :
return 'マンマーカー';
case '/files/images/common/ico_type_7.gif' :
return 'スイーパー';
case '/files/images/common/ico_type_8.gif' :
return 'レジスタ';
case '/files/images/common/ico_type_9.gif' :
return 'アタッカー';
case '/files/images/common/ico_type_10.gif' :
return 'チャンスメーカー';
case '/files/images/common/ico_type_11.gif' :
return 'ストライカー';
case 'files/images/icon_01.gif' :
return 'P';
case 'files/images/icon_04.gif' :
return '蹴';
case 'files/images/icon_05.gif' :
return '速';
case 'files/images/icon_06.gif' :
return '体';
case 'files/images/icon_07.gif' :
return '技';
case 'files/images/icon_08.gif' :
return '筋';
case 'files/images/icon_09.gif' :
return '跳';
case 'files/images/icon_10.gif' :
return '心';
case 'files/images/icon_11.gif' :
return 'タイプ';
default :
return 'スタメン';
}
}
var starting = statusSelector($(this).attr('class'));
var position = statusSelector($(this).children().eq(0).children('img').attr('src'));
var playerName = $(this).children('.playerName').text();
if (playerName.length == 0){
playerName = '選手';
}
var kick = statusSelector($(this).children().eq(3).children('img').attr('src'));
var speed = statusSelector($(this).children().eq(4).children('img').attr('src'));
var stamina = statusSelector($(this).children().eq(5).children('img').attr('src'));
var technique = statusSelector($(this).children().eq(6).children('img').attr('src'));
var physical = statusSelector($(this).children().eq(7).children('img').attr('src'));
var jump = statusSelector($(this).children().eq(8).children('img').attr('src'));
var mental = statusSelector($(this).children().eq(9).children('img').attr('src'));
var type = statusSelector($(this).children().eq(10).children('img').attr('src'));
$('#copyStatusTbody').append('<tr><td>' + starting + '</td><td>' + position + '</td><td>' + playerName + '</td><td>' + kick + '</td><td>' + speed + '</td><td>' + stamina + '</td><td>' + technique + '</td><td>' + physical + '</td><td>' + jump + '</td><td>' + mental + '</td><td>' + type + '</td></tr>');
});
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。