したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |

戦国IXA ツールスレPart49

111名無しさん:2024/03/25(月) 05:37:16 ID:gP.Mv2OE
>>100
そもそもの右クリックがmokoのものにならないとしたら1つ前のfunctionのこちらが原因ではないでしょうか?

function cardTool() {
if (!options.card_tool) {
return;
}

var target = null,
select_card_group = $('#select_card_group').val();
if (location.pathname == '/card/deck.php' || location.pathname.endsWith('defense_formation_deck.php')) {
if (select_card_group != -2) {
target = $('div.ig_deck_smallcardarea');
} else {
target = $('#deck_file').find('tr.tr_gradient:gt(0)');
}
} else if (location.pathname == '/facility/set_unit_list.php' || location.pathname == '/union/levelup.php' || location.pathname == '/union/additional.php' || location.pathname == '/union/learn.php') {
target = $('#deck_file').find('tr.tr_gradient:gt(0)');
} else if (location.pathname == '/card/trade_card.php') {
target = $('div.ig_deck_subcardarea');
} else if (location.pathname == '/card/trade.php' || location.pathname == '/card/exhibit_list.php') {
target = $('table.common_table1').find('tr.fs12');
} else if (location.pathname == '/user/present.php') {
target = $('div.family_name:has(a.thickbox)');
}

if (!target) {
return;
}

$('body').on('contextmenu', target.selector, function(e) {
if (e.target.tagName == 'A') {
return;
}
e.preventDefault();
var search, data, $tooltip;
if (location.pathname == '/card/trade_card.php' && select_card_group != -2) {
search = $(this);
} else {
var card_id = $(this).find('a.thickbox').attr('href').match(/\d+/g)[2];
search = $('div[id="cardWindow_' + card_id + '"]');
}
data = get_card_data(search);
$tooltip = display_tooltip(e.pageX, e.pageY, 20).empty();
return createCardTooltip(e, $(this), $tooltip, data);
});
}

こちらfunction cardTool()の全文です
条件に合致した場合、e.preventDefault();でブラウザ本来の
右クリック動作を無効にしています。


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板