javascript:(function(){if(document.getElementById(“my-slot-history-btn”))return;const e=5,t=”my_slot_history”;function o(){try{return JSON.parse(localStorage.getItem(t))||[]}catch(e){return[]}}function n(n){let c=o();c=c.filter((e=>e!==n)),c.unshift(n),c.length>e&&c.pop(),localStorage.setItem(t,JSON.stringify(c)),r()}function c(e){let n=o();n=n.filter((t=>t!==e)),localStorage.setItem(t,JSON.stringify(n)),r()}document.querySelectorAll(“.swell-block-accordion__title”).forEach((e=>{e.addEventListener(“click”,(function(){const t=this.querySelector(“.swell-block-accordion__label strong”);if(t){const e=t.textContent.trim();[“天井”,”狙い目”,”備考”,”更新履歴”].some((t=>e.includes(t)))||e.length<=1||n(e)}}))}));const i=document.createElement(“div”);i.id=”my-slot-history-btn”,i.innerHTML=”履歴”,Object.assign(i.style,{position:”fixed”,bottom:”20px”,right:”20px”,backgroundColor:”#00c41a”,color:”#fff”,padding:”15px 12px”,borderRadius:”50%”,boxShadow:”0 2px 5px rgba(0,0,0,0.3)”,zIndex:”999999″,cursor:”pointer”,fontWeight:”bold”,fontSize:”14px”,textAlign:”center”,lineHeight:”1″});const s=document.createElement(“div”);s.id=”my-slot-history-menu”,Object.assign(s.style,{position:”fixed”,bottom:”80px”,right:”20px”,backgroundColor:”#fff”,border:”2px solid #00c41a”,borderRadius:”8px”,padding:”10px”,boxShadow:”0 4px 10px rgba(0,0,0,0.2)”,zIndex:”999998″,display:”none”,width:”250px”,maxHeight:”50vh”,overflowY:”auto”}),i.onclick=function(){s.style.display=”none”===s.style.display?”block”:”none”};function r(){const e=o();if(s.innerHTML=’
直近見た機種
‘,0===e.length)s.innerHTML+=’履歴がありません
‘;else{e.forEach((e=>{const t=document.createElement(“div”);Object.assign(t.style,{display:”flex”,justifyContent:”space-between”,alignItems:”center”,padding:”10px 0″,borderBottom:”1px dotted #eee”,fontSize:”14px”});const o=document.createElement(“span”);o.innerText=e,Object.assign(o.style,{cursor:”pointer”,color:”#1176d4″,flex:”1″,paddingRight:”10px”,overflow:”hidden”,textOverflow:”ellipsis”,whiteSpace:”nowrap”}),o.onclick=function(){!function(e){const t=document.querySelectorAll(“.swell-block-accordion__label strong”);let o=null;for(let n=0;n{if(!e.classList.contains(“is-opened”)){let t=e.querySelector(“summary”);t&&t.click()}})),setTimeout((()=>{o.scrollIntoView({behavior:”smooth”,block:”center”})}),400)}(e),s.style.display=”none”};const n=document.createElement(“span”);n.innerHTML=”×”,Object.assign(n.style,{cursor:”pointer”,color:”#999″,fontSize:”16px”,fontWeight:”bold”,padding:”0 5px”}),n.onclick=function(t){t.stopPropagation(),c(e)},t.appendChild(o),t.appendChild(n),s.appendChild(t)}))}}document.body.appendChild(i),document.body.appendChild(s),r()})();
「履歴bookmarklet.txt」
当ページのリンクには広告が含まれています。