'15.03.24現在のフォイルリスト作成手順まとめ
バージョンアップや機能追加があってややこしくなってきたので、一旦ちゃんとまとめておきます。
フォイルリストの完成予想図はこんな感じ。
まぁスクリプトの使い方は以下の動画を見ていただければだいたい分かるかと。
準備
スクリプト1(リスト編集用スクリプト)
javascript:(function(d){(w=box_wrapper).style.top=0;(c=box_container).style.background='#000';w.style.height=c.style.height=(innerHeight-110)+'px';card_detail_wrapper.style.top='100%';Array.prototype.forEach.call(c.childNodes[1].childNodes,function(e){if(!(e.n=+(e.q=e.childNodes[3]).innerHTML.match(/\d/)))e.style.display='none';e.onclick=function(){this.style.display='none';window.prev=this;};e.oncontextmenu=function(){this.q.innerHTML='x'+(this.n=this.n-1||9);return false;};});box_search.onclick=function(){prev.style.display='inline-block';};})(document);
スクリプト2(画像出力用スクリプト)
javascript:(function(d){a=[];Array.prototype.forEach.call(c.childNodes[1].childNodes,function(e){if(e.style.display!='none'){s=e.childNodes;b=new Image();b.src=s[5].getAttribute('style').match(/\.\..+jpg/);b.f=s[1].className;b.n=e.n;a.push(b);}});f=new Image();f.src='../img/pc/foil/foil_thum.png';q=new Image();q.src='../img/pc/deck/card_quantity_bg.png';v=d.createElement('canvas');v.width=o=Math.min(16,a.length)*40;v.height=p=(((a.length-1)/16|0)+1)*56;t=v.getContext('2d');t.font='12pt Arial';t.fillRect(0,0,o,p);t.fillStyle='#FFF';for(m=0;m<a.length;m++){x=(m%(16))*40;y=(m/16|0)*56;t.drawImage(a[m],x,y,40,56);if(a[m].f)t.drawImage(f,x,y,40,56);t.drawImage(q,x+19,y+40,21,16);t.fillText('x'+a[m].n,x+22,y+54);}i=new Image();with(i.style){display='block';position='fixed';top=0;right=0;zIndex=100;}i.src=v.toDataURL();d.body.appendChild(i);})(document);