gempir

Untitled

Oct 7th, 2021
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <style>
  2. body {
  3. text-align: center;
  4. padding-top: 350px;
  5. font-family: Arial, sans-serif;
  6. font-size: 69px;
  7. background-color: #000000;
  8. }
  9.  
  10. a {
  11. text-decoration: none;
  12. color: white;
  13. }
  14. </style>
  15.  
  16.  
  17. <a href="#" data-links="http://www.thesmokinggun.com/time-waster/match-arrestee-their-alleged-crime, https://neal.fun/, https://map.snapchat.com/, http://radio.garden/, https://www.its-ok-i-guess.com/, https://humanbenchmark.com/, https://www.updownfunk.com/, https://languageguesser.com/en" target="_blank">CLICK THIS<br></a>
  18.  
  19. <script>
  20. var linksArr = document.getElementsByTagName('A');
  21.  
  22. console.log(linksArr);
  23. console.log(linksArr[0].hasAttribute('data-links'));
  24.  
  25. for (var i = 0; i < linksArr.length; i++) {
  26. if (linksArr[0].hasAttribute('data-links')) {
  27. var linksList = linksArr[i].getAttribute('data-links').split(',');
  28. console.log(linksList);
  29. console.log(linksList.length);
  30. var index = getRandomInt(0,linksList.length);
  31. console.log(index);
  32. linksArr[i].setAttribute('href', linksList[index].trim());
  33. }
  34. }
  35.  
  36. function getRandomInt(min, max) {
  37. min = Math.ceil(min);
  38. max = Math.floor(max);
  39. return Math.floor(Math.random() * (max - min)) + min;
  40. }
  41.  
  42.  
  43.  
  44.  
  45. </script>
Advertisement
Add Comment
Please, Sign In to add comment