イバラシティ用Tempermonkeyユーザースクリプトとブックマークレット

イバラシティの戦闘設定のスキルを並べ替えちゃうボタン

javascript:(function(){var e=function(c){c.srcElement.parentNode.querySelectorAll("div.LITEM > select").forEach(function(a){Array.from(a.querySelectorAll("option"),function(b){var d=b.textContent.replace(/(\u3010EP\d+\u3011)|(\uff3bSP\d+\uff3d)|(\s)/g,"");return{dom:b,skill:d}}).sort(function(b,d){return b.skill<d.skill?-1:1}).forEach(function(b){return a.appendChild(b.dom)})});alert("\u305b\u3044\u308c\u3064\u3057\u305f");return!1};document.querySelectorAll('div[id^="LISTJN"]').forEach(function(c){var a=document.createElement("button"); a.textContent="\u30b9\u30ad\u30eb\u3092\u3060\u3044\u305f\u3044\u4e94\u5341\u97f3\u9806\u306b\u4e26\u3079\u66ff\u3048\u3061\u3083\u3046\u3088\u30dc\u30bf\u30f3";a.onclick=e;c.prepend(a)})})();

異能調整を5倍速でやる

javascript:function fast(){var b=document.getElementById("fastspin");b.onclick=function(){return!1};b.textContent="\u3082\u3046\uff15\u500d\u901f\u3060\u3088";document.querySelectorAll("img[src='p/sminus.png'], img[src='p/splus.png']").forEach(function(c){var a=c.onclick;c.onclick=function(){a();a();a();a();a()}});return!1}var btn=document.createElement("button");btn.id="fastspin";btn.textContent="\u7570\u80fd\u8abf\u6574\u3092\uff15\u500d\u901f\u306b\u3059\u308b\u30dc\u30bf\u30f3";btn.onclick=fast;document.getElementById("submit1").parentNode.prepend(btn);

ミッションをソートする

画像1

tenpermonkey
http://yayau.s500.xrea.com/ibr-sight/MissionSorter.user.js

javascript:function missionSorter(){var b=document.querySelector("select[name='dt_mission']");Array.from(b.querySelectorAll("option")).sort(function(a,c){return a.textContent<c.textContent?-1:1}).forEach(function(a){0<Number(a.value)&&b.appendChild(a)});alert("\u30bd\u30fc\u30c8\u3057\u305f");return!1}var btn=document.createElement("button");btn.textContent="\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u30bd\u30fc\u30c8\u3059\u308b\u30dc\u30bf\u30f3";btn.onclick=function(){return missionSorter()};
var select=document.querySelector("select[name='dt_mission']"),table=select.closest("table");table.parentNode.insertBefore(btn,table);

結果画面を見やすくする

javascript:var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(d){return d.raw=d};$jscomp.createTemplateTagFirstArgWithRaw=function(d,g){d.raw=g;return d};(function(){var d={title:["\u7a2e\u985e"],weapon:"\u6b66\u5668 \u5927\u7832 \u546a\u5668 \u9b54\u5f3e \u6226\u76fe \u6697\u5668 \u5b9d\u73e0 \u8089\u7403 \u795e\u5668 \u6bd2\u7259".split(" "),armor:"\u9632\u5177 \u6cd5\u8863 \u91cd\u93a7 \u8863\u88c5 \u9694\u58c1 \u8056\u8863 \u706b\u8863 \u6c34\u8863 \u98a8\u8863 \u5730\u8863 \u9b54\u8863".split(" "),jewel:"\u88c5\u98fe \u9b54\u6676 \u8b77\u7b26 \u5fa1\u5b88 \u85ac\u7bb1 \u697d\u5668 \u5149\u98fe \u95c7\u98fe \u9b54\u93e1".split(" "),food:"\u6599\u7406 \u9b54\u9999 \u8cc4\u98ef \u8b0e\u98ef \u5065\u98df \u5589\u98f4".split(" "),rawfood:["\u98df\u6750"]},g={"\u6226\u95d8\u958b\u59cb\u6642":1,"\u6226\u95d8\u96e2\u8131\u524d":2,"\u30bf\u30fc\u30f3\u958b\u59cb\u6642":3,"\u81ea\u5206\u884c\u52d5\u524d":4,"\u901a\u5e38\u653b\u6483\u5f8c":5,"\u30b9\u30ad\u30eb\u4f7f\u7528\u5f8c":6,"\u653b\u6483\u547d\u4e2d\u5f8c":7,"\u88ab\u653b\u6483\u547d\u4e2d\u5f8c":8,"\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u5f8c":9,"\u88ab\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u5f8c":10,"\u653b\u6483\u56de\u907f\u5f8c":11,"\u88ab\u653b\u6483\u56de\u907f\u5f8c":12,"HP\u56de\u5fa9\u5f8c":13,"\u88abHP\u56de\u5fa9\u5f8c":14,"\u5e38\u6642":99};document.querySelector("body").insertAdjacentHTML("beforeend","<div id='y_navi' style='\n position:sticky;\n bottom:0px;\n padding: 10px;\n z-index:100;\n background-color:gray;\n text-align: center;\n font-weight: bold;\n '\n >\n <a href='#y_action'>action</a>\u3000,\n <a href='#y_next'>next</a>\u3000,\n <a href='#y_item'>item</a>\u3000,\n <a href='#y_skill'>skill</a>\u3000,\n <a href='#y_card'>card</a>\u3000,\n\n <a href='http://lisge.com/ib/act_index.php' target='_blank'>login</a> ,\n ");document.querySelector('img[src$="t_action.png"]').setAttribute("id","y_action");document.querySelector('img[src$="p/ne.png"]').setAttribute("id","y_next");document.querySelector('img[src$="t_item.png"]').setAttribute("id","y_item");document.querySelector('img[src$="t_skill.png"]').setAttribute("id","y_skill");document.querySelector('img[src$="t_card.png"]').setAttribute("id","y_card");(function(){var c=document.querySelector("img[src$='skill.png']").parentElement.querySelectorAll("table")[2].querySelectorAll("tr");c=Array.from(c,function(a){return{name:a.querySelector("td:nth-of-type(2)").textContent,text:a.querySelector("td:nth-of-type(6)").textContent.replace(/\u767a\u52d5\u7d50\u679c$/,"")}}).filter(function(a){return a.text.includes("\u3010\u5e38\u6642\u3011")}).sort(function(a,h){return a.text<h.text?-1:1});var b=document.querySelector("img[src$='skill.png']").parentElement.querySelectorAll("tbody")[0];c.forEach(function(a){b.insertAdjacentHTML("beforeend",'<tr>\n <td bgcolor="#111111">'+a.name+'</td>\n <td bgcolor="#111111"></td>\n <td bgcolor="#111111">'+a.text+"</td>\n </tr>")})})();(function(){var c=document.querySelector("img[src$='t_skill.png']").closest("div").querySelector("table:nth-of-type(3)");c.querySelector("tr:nth-of-type(1)");Array.from(c.querySelectorAll("tr:not(tr:nth-of-type(1))"),function(b,a){return{dom:b,timing:g[b.querySelector("td:nth-of-type(6)").textContent.match(/^\u3010(.+?)\u3011/)[1]],order:a}}).sort(function(b,a){return b.timing>a.timing?1:b.timing<a.timing?-1:b.order>a.order?1:-1}).forEach(function(b){return c.insertBefore(b.dom,null)})})();(function(){var c={title:[],weapon:[],armor:[],jewel:[],food:[],rawfood:[]},b=document.querySelector("img[src$='t_item.png'").parentNode;b.querySelectorAll("table tr").forEach(function(f){a:{var e=f.querySelector("td:nth-of-type(3)").textContent;for(var k in d)if(d[k].includes(e)){e=k;break a}e=!1}e&&c[e].push(f.cloneNode(!0))});var a=document.createElement("table");a.style.cellPadding=2;for(var h in c)c[h].forEach(function(f){a.appendChild(f)});b.prepend(a);b.prepend(document.createElement("br"))})()})();

戦闘設定画面で装備を見る

javascript:(function(){function m(g){var e={title:[],weapon:[],armor:[],jewel:[]};g.querySelector("img[src$='t_item.png']").parentNode.querySelectorAll("table tr").forEach(function(d){a:{var c=d.querySelector("td:nth-of-type(3)").textContent;for(var k in l)if(l[k].includes(c)){c=k;break a}c=!1}c&&(d.style.color=n[c],e[c].push(d.cloneNode(!0)))});var a=document.createElement("table");a.cellPadding=2;for(var b in e)e[b].forEach(function(d){a.appendChild(d)});return a}var l={title:["\u7a2e\u985e"],weapon:"\u6b66\u5668 \u5927\u7832 \u546a\u5668 \u9b54\u5f3e \u6226\u76fe \u6697\u5668 \u5b9d\u73e0 \u8089\u7403 \u795e\u5668 \u6bd2\u7259".split(" "),armor:"\u9632\u5177 \u6cd5\u8863 \u91cd\u93a7 \u8863\u88c5 \u9694\u58c1 \u8056\u8863 \u706b\u8863 \u6c34\u8863 \u98a8\u8863 \u5730\u8863 \u9b54\u8863".split(" "),jewel:"\u88c5\u98fe \u9b54\u6676 \u8b77\u7b26 \u5fa1\u5b88 \u85ac\u7bb1 \u697d\u5668 \u5149\u98fe \u95c7\u98fe \u9b54\u93e1".split(" ")},n={weapon:"deeppink",armor:"cyan",jewel:"yellowgreen"},p=document.querySelector("a.F2").href,f=null,h=document.createElement("button");h.type="button";h.textContent="\u7d50\u679c\u30da\u30fc\u30b8\u304b\u3089\u88c5\u5099\u4e00\u89a7\u3092\u5f15\u3063\u5f35\u3063\u3066\u304f\u308b\u30dc\u30bf\u30f3";document.querySelectorAll("table.BLK dl").forEach(function(g){g.parentNode.appendChild(h.cloneNode(!0)).addEventListener("click",function(e){var a=this;f?(this.parentNode.appendChild(f.cloneNode(!0)),this.parentNode.removeChild(this)):fetch(p).then(function(b){return b.text()}).then(function(b){b=(new DOMParser).parseFromString(b,"text/html");f=m(b);a.parentNode.appendChild(f.cloneNode(!0));a.parentNode.removeChild(a)})})})})();

この記事が気に入ったらサポートをしてみませんか?