Created
April 23, 2025 20:21
-
-
Save 3kh0/4ce6a3e75d7284a61009802851f11c88 to your computer and use it in GitHub Desktop.
Page flip bookmarklet
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:(function(){function f(){let fc=document.getElementById('ghu');if(!fc){fc=document.createElement('div');fc.id='ghu';Object.assign(fc.style,{position:'fixed',top:'0',left:'0',width:'100%',height:'100%',zIndex:'9999',overflow:'auto',transform:'rotate(180deg)',backgroundColor:document.body.style.backgroundColor||'white'});const bc=document.body.cloneNode(true);const ec=bc.querySelector('#ghu');if(ec){ec.remove();}fc.appendChild(bc);document.body.appendChild(fc);Array.from(document.body.children).forEach(child=>{if(child.id!=='ghu'){child.style.display='none';}});}else{fc.remove();Array.from(document.body.children).forEach(child=>{child.style.display='';});}}f();})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment