Kawiesh

Auto-Refresh-Bookmarklet

Jan 19th, 2021 (edited)
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. OG: https://gist.github.com/eculver/267327
  2. MOD: https://gist.github.com/kdahlhaus/3f7c803f7e147d6c28951d927c998df4
  3. MINE: https://gist.github.com/kawiesh/ee489b18b11c0f461f446fd9ca2d34a6
  4. ......
  5.  
  6. let a= location.href;
  7. let b= prompt('enter time');
  8.  
  9. setInterval(function(){
  10. let called=false;
  11. let y= 0;
  12. if (called) y = window.frames[0].scrollY;
  13. else{
  14. y= window.scrollY;
  15. called=true;
  16. }
  17. let c= window.open('','_self');
  18. c.document.write(`<iframe src="${a}"
  19. style="top:0;left:0;
  20. width:100%;height:100%;
  21. position: absolute;
  22. border:none"></iframe>`);
  23. },1000*b);
  24.  
  25. ....
  26.  
  27.  
  28. let a= location.href,
  29.     b= prompt();
  30.  
  31. if(b>0){
  32. setInterval(function(){
  33. let c= document.createElement('iframe');
  34.     c.src= a;
  35.     c.style.top=0;
  36.     c.style.left=0;
  37.     c.style.position='absolute';
  38.     c.style.height='100%';
  39.     c.style.width='100%';
  40. document.body.appendChild(c);
  41. },1000*b)
  42. }
  43.  
  44. else alert('No');
Add Comment
Please, Sign In to add comment