javascript:(()=>{const s=document.getElementById('ftb-ext-sidebar'),h=document.getElementById('ftb-ext-header'),l=document.getElementById('ftb-ext-list');if(!s||!h||!l)return alert('先に本体を起動してください');try{let w=localStorage.ftbExtW;if(w)s.style.width=w+'px'}catch(e){}let ex=document.getElementById('ftb-ext-ex-input');if(!ex){const r=document.createElement('div');r.className='ftb-ext-input-row';r.innerHTML='
';h.appendChild(r);ex=document.getElementById('ftb-ext-ex-input');try{ex.innerText=localStorage.ftbExtEx||''}catch(e){}}const f=()=>{const ws=ex.innerText.replace(/\r?\n/g,%27 %27).trim().split(/[\s%E3%80%80]+/).filter(Boolean);try{localStorage.ftbExtEx=ex.innerText.replace(/\r?\n/g,%27 %27).trim()}catch(e){}Array.from(l.querySelectorAll(%27.ftb-ext-item-container%27)).forEach(c=>{const t=c.innerText;c.style.display=ws.some(w=>t.includes(w))?%27none%27:%27%27})};ex.addEventListener(%27keydown%27,e=>{if(e.key===%27Enter%27){e.preventDefault();f()}});new MutationObserver(()=>setTimeout(f,30)).observe(l,{childList:true,subtree:false});h.style.cursor=%27move%27;let p=0;document.addEventListener(%27click%27,e=>{if(e.target.closest(%27.ftb-ext-item%27))p=l.scrollTop;if(e.target.closest(%27#ftb-ext-modal-close')||e.target.id=='ftb-ext-modal-bg')setTimeout(()=>{l.scrollTop=p;f()},80)},true);let d=0,x=0,y=0,a=0,b=0;h.onmousedown=e=>{if(e.target.closest('button,[contenteditable],input,textarea,select,a,.ftb-ext-resize'))return;d=1;x=e.clientX;y=e.clientY;const r=s.getBoundingClientRect();a=r.left;b=r.top;s.style.left=a+'px';s.style.top=b+'px';s.style.right='auto';document.onmousemove=e=>{if(!d)return;s.style.left=Math.max(0,Math.min(innerWidth-s.offsetWidth,a+e.clientX-x))+'px';s.style.top=Math.max(0,Math.min(innerHeight-s.offsetHeight,b+e.clientY-y))+'px'};document.onmouseup=()=>{d=0;document.onmousemove=document.onmouseup=null};e.preventDefault()};const mk=(id,side)=>{let g=document.getElementById(id);if(!g){g=document.createElement('div');g.id=id;g.className='ftb-ext-resize';s.appendChild(g)}g.style.cssText='position:absolute;'+side+':-5px;top:0;width:10px;height:100%;cursor:ew-resize;z-index:10001';g.onmousedown=e=>{e.stopPropagation();e.preventDefault();const r=s.getBoundingClientRect(),L=r.left,R=r.right,W=r.width,X=e.clientX;document.onmousemove=e=>{let nw,nl=L;if(side=='left'){nw=Math.max(260,Math.min(innerWidth,W-(e.clientX-X)));nl=R-nw;if(nl<0){nw=R;nl=0}}else{nw=Math.max(260,Math.min(innerWidth-L,W+(e.clientX-X)))}s.style.width=nw+'px';s.style.left=nl+'px';s.style.right='auto'};document.onmouseup=()=>{try{localStorage.ftbExtW=parseInt(s.offsetWidth)}catch(e){}document.onmousemove=document.onmouseup=null}}};mk('ftb-ext-resize-l','left');mk('ftb-ext-resize-r','right');f()})()