IWBH_01

convert javascript to bookmark

Jan 23rd, 2021
814
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type your javascript: <br>
  2. <textarea id="tx" >
  3. </textarea>
  4.  
  5. <br>
  6. <button id="g">click here to convert your script to a link</button>
  7. <br>
  8. <a id="a1" >now bookmark this link</a>
  9. <script>
  10. var d=document,gI="getElementById",g=d[gI]("g"),tx=d[gI]("tx"),a1=d[gI]("a1");
  11.  
  12. g.onclick=function(){ a1.href="javascript:(function("+(tx.value.replace(/\x22/g,"%22").replace(/\r/g," ").replace(/\n/g," "))+")();"; };
  13. </script>
RAW Paste Data