Guest User

Untitled

a guest
May 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // 括弧内を開閉できるようにする。
  2. javascript:(() => {
  3. var s=document.createElement('style');s.innerText='.toggler0 { text-indent:0; width:16px; display: inline-block; animation: 0.2s ease-in forwards rotation; } .toggler1 { text-indent:0; width:16px; display: inline-block; animation: 0.2s ease-in reverse forwards rotation; } @keyframes rotation { 0%25 { transform: rotate(0deg) } 100%25 { transform: rotate(-90deg) } }';document.getElementsByTagName('head')[0].appendChild(s);
  4. })();
  5. [0,1].forEach((l) => {
  6. const d=document;var s=d.body.innerHTML;d.body.innerHTML=s.replace(/(([^(]+?))/g,"<span style=\"\"><span onclick=\"var n=this.nextSibling;if(n.style.display === 'none'){n.style.display = '';this.className='';this.className = 'toggler1';}else{ n.style.display = 'none';this.className='';this.className = 'toggler0';} \" class=\"toggler0\" style=\"color: #aaa; cursor: pointer;\">▼</span><span style=\"display: none\"> ($1) </span></span>");
  7. })
Add Comment
Please, Sign In to add comment