Last active
          October 28, 2018 04:53 
        
      - 
      
 - 
        
Save Nyoho/3d0647fbf6c6e98b9b8c552ddeaab22f to your computer and use it in GitHub Desktop.  
    Bookmarklet that lets you open and close zenkaku-parenthesis parts 全角括弧内を開閉できるようにするブックマークレット
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 括弧内を開閉できるようにする。 | |
| javascript:(() => { | |
| 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); | |
| })(); | |
| [0,1].forEach((l) => { | |
| 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>"); | |
| }) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment