「パズドラ ダメージ計算」にラードラボタンを表示するブックマークレット
by
kageroh_
2015-11-28 [2015/11/28 21:38:22]
@@ -1,4 +1,4 @@
-/*
+/*
* @title 「パズドラ ダメージ計算」にラードラボタンを表示するブックマークレット
* @include http://www.geocities.jp/pangya_monooki/p/dmg-sim2/
* @license MIT License
@@ -17,13 +17,15 @@
for (var node, i = 0; node = inputs[i]; i++) node.parentNode.removeChild(node);
input1.value = 'ラードラパ(闘技場)ボタン';
- input1.style.left = '800px';
- input1.style.top = '420px';
+ input1.style.left = 'auto';
+ input1.style.top = '9em';
+ input1.style.right = '0';
document.body.appendChild(input1);
input2.value = 'ラードラパ(ソティス)ボタン';
- input2.style.left = '800px';
- input2.style.top = '445px';
+ input2.style.left = 'auto';
+ input2.style.top = (parseInt(input1.style.top, 10) + 2).toString(10) + 'em';
+ input2.style.right = '0';
document.body.appendChild(input2);
input1.onclick = function () {
/*
* @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[onclick^=set_ra]');
var input1 = inputs[0].cloneNode(true);
var input2 = inputs[0].cloneNode(true);
for (var node, i = 0; node = inputs[i]; i++) node.parentNode.removeChild(node);
input1.value = 'ラードラパ(闘技場)ボタン';
input1.style.left = 'auto';
input1.style.top = '9em';
input1.style.right = '0';
document.body.appendChild(input1);
input2.value = 'ラードラパ(ソティス)ボタン';
input2.style.left = 'auto';
input2.style.top = (parseInt(input1.style.top, 10) + 2).toString(10) + 'em';
input2.style.right = '0';
document.body.appendChild(input2);
input1.onclick = function () {
select_option(document.querySelector('select[name=enemy_color]'), /^火$/);
document.all.skill_onoff.selectedIndex = 0;
select_option(document.querySelector('select[name=ls]'), /^9倍$/);
select_option(document.querySelector('select[name=fs]'), /^8倍$/);
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 = 2269;
document.getElementById('atk_a:a:c').value = 2269;
document.getElementById('atk_a:a:d').value = 2092;
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 = 1;
document.getElementById('tway_2').selectedIndex = 1;
document.getElementById('tway_3').selectedIndex = 0;
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 = 4;
document.getElementById('color_main_a:a:c').selectedIndex = 4;
document.getElementById('color_main_a:a:d').selectedIndex = 1;
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 = 1;
document.getElementById('color_sub_a:a:c').selectedIndex = 1;
document.getElementById('color_sub_a:a:d').selectedIndex = 3;
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, /^2\.0倍$/);
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();
};
input2.onclick = function () {
select_option(document.querySelector('select[name=enemy_color]'), /^光$/);
document.all.skill_onoff.selectedIndex = 0;
select_option(document.querySelector('select[name=ls]'), /^4\.5倍$/);
select_option(document.querySelector('select[name=fs]'), /^4\.5倍$/);
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 = 2269;
document.getElementById('atk_a:a:c').value = 2269;
document.getElementById('atk_a:a:d').value = 2092;
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 = 1;
document.getElementById('tway_2').selectedIndex = 1;
document.getElementById('tway_3').selectedIndex = 0;
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 = 4;
document.getElementById('color_main_a:a:c').selectedIndex = 4;
document.getElementById('color_main_a:a:d').selectedIndex = 1;
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 = 1;
document.getElementById('color_sub_a:a:c').selectedIndex = 1;
document.getElementById('color_sub_a:a:d').selectedIndex = 3;
document.getElementById('color_sub_a:a:e').selectedIndex = 4;
document.getElementById('color_sub_a:a:f').selectedIndex = 4;
document.all.combo_select.value = 5;
select_option(document.all.enhance, /^なし$/);
select_option(document.all.enh_power, /^1\.0倍$/);
document.getElementById('drop_red1').value = 25;
document.getElementById('drop_blue1').value = 8;
document.getElementById('drop_green1').value = 27;
document.getElementById('drop_yellow1').value = 8;
document.getElementById('drop_purple1').value = 3;
bg_change(0);
main();
};
}());
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。