「パズドラ ダメージ計算」にラードラボタンを表示するブックマークレット
by
kageroh_
2015-11-28 [2015/11/28 21:38:22]
-
/*
* @title 「パズドラ ダメージ計算」にラードラボタンを表示するブックマークレット
* @include http://www.geocities.jp/pangya_monooki/p/dmg-sim2/
* @license MIT License
*/
(function () {
function select_option (select, regexp) {
var options = select.options;
for (var option, i = 0; option = options[i]; i++) if (regexp.test(option.text.trim())) break;
select.selectedIndex = i;
}
var inputs = document.querySelectorAll('input[id^="drop_"]');
for (var input, i = 0; input = inputs[i]; i++) {
input.type = 'number';
input.value = '';
input.placeholder = 0;
input.style.width = '3em';
}
var input = document.querySelector('input[onclick^="set_ra"]');
input = input.cloneNode(true);
var table = document.querySelector('table[style*="left:800"]');
table.parentNode.removeChild(table);
input.value = 'ラードラパボタン';
input.style.position = 'absolute';
input.style.left = 'auto';
input.style.top = '9em';
input.style.right = '0';
document.body.appendChild(input);
input.onclick = function () {
select_option(document.querySelector('select[name="enemy_color"]'), /^火$/);
document.all.skill_onoff.selectedIndex = 0;
select_option(document.querySelector('select[name="ls"]'), /^ラードラ6色$/);
select_option(document.querySelector('select[name="fs"]'), /^ラードラ6色$/);
document.all.na.value = "ラードラ99";
document.all.nb.value = "覚醒イシス99";
document.all.nc.value = "闇カーリー99";
document.all.nd.value = "闇カーリー99";
document.all.ne.value = "インドラ99";
document.all.nf.value = "ラードラ99";
select_option(document.getElementById('type_main_a:a:a'), /^神$/);
select_option(document.getElementById('type_sub_a:a:a'), /^ドラゴン$/);
select_option(document.getElementById('type_main_a:a:b'), /^神$/);
select_option(document.getElementById('type_sub_a:a:b'), /^悪魔$/);
select_option(document.getElementById('type_main_a:a:c'), /^神$/);
select_option(document.getElementById('type_sub_a:a:c'), /^ドラゴン$/);
select_option(document.getElementById('type_main_a:a:d'), /^神$/);
select_option(document.getElementById('type_sub_a:a:d'), /^ドラゴン$/);
select_option(document.getElementById('type_main_a:a:e'), /^神$/);
select_option(document.getElementById('type_sub_a:a:e'), /^ドラゴン$/);
select_option(document.getElementById('type_main_a:a:f'), /^神$/);
select_option(document.getElementById('type_sub_a:a:f'), /^ドラゴン$/);
document.getElementById('atk_a:a:a').value = 2003;
document.getElementById('atk_a:a:b').value = 2092;
document.getElementById('atk_a:a:c').value = 2269;
document.getElementById('atk_a:a:d').value = 2269;
document.getElementById('atk_a:a:e').value = 1962;
document.getElementById('atk_a:a:f').value = 2003;
document.getElementById('tway_0').selectedIndex = 2;
document.getElementById('tway_1').selectedIndex = 0;
document.getElementById('tway_2').selectedIndex = 1;
document.getElementById('tway_3').selectedIndex = 1;
document.getElementById('tway_4').selectedIndex = 0;
document.getElementById('tway_5').selectedIndex = 2;
document.getElementById('color_main_a:a:a').selectedIndex = 3;
document.getElementById('color_main_a:a:b').selectedIndex = 1;
document.getElementById('color_main_a:a:c').selectedIndex = 4;
document.getElementById('color_main_a:a:d').selectedIndex = 4;
document.getElementById('color_main_a:a:e').selectedIndex = 3;
document.getElementById('color_main_a:a:f').selectedIndex = 3;
document.getElementById('color_sub_a:a:a').selectedIndex = 4;
document.getElementById('color_sub_a:a:b').selectedIndex = 3;
document.getElementById('color_sub_a:a:c').selectedIndex = 1;
document.getElementById('color_sub_a:a:d').selectedIndex = 1;
document.getElementById('color_sub_a:a:e').selectedIndex = 4;
document.getElementById('color_sub_a:a:f').selectedIndex = 4;
document.all.combo_select.value = 8;
select_option(document.all.enhance, /^なし$/);
select_option(document.all.enh_power, /^1\.0倍$/);
select_option(document.querySelector('select[name="stim_blue"]'), /^1枚$/);
select_option(document.querySelector('select[name="kd_blue"]'), /^2枚$/);
document.getElementById('drop_red1').value = 3;
document.getElementById('drop_blue1').value = 3;
document.getElementById('drop_green1').value = 3;
document.getElementById('drop_yellow1').value = 3;
document.getElementById('drop_purple1').value = 3;
bg_change(0);
main();
};
}());
-
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。