BrU32

JS Imgur.com Random Image Gallery Generator SRC

Jun 30th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <script>
  2. function GenImGurImage()
  3. {
  4. var amm1=0;
  5. var amm=prompt("Enter # Of Images To Generate:");
  6. var text = "";
  7. var possible="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678";
  8. while(amm1!=amm){
  9. amm1++;
  10. for( var i=0; i < 5; i++ )
  11. text += possible.charAt(Math.floor(Math.random() * possible.length));
  12. document.write("<img src=http://i.imgur.com/"+text+".jpg></img>");
  13. text="";
  14. }
  15. }
  16. GenImGurImage()
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment