Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- body {
- text-align: center;
- padding-top: 350px;
- font-family: Arial, sans-serif;
- font-size: 69px;
- background-color: #000000;
- }
- a {
- text-decoration: none;
- color: white;
- }
- </style>
- <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>
- <script>
- var linksArr = document.getElementsByTagName('A');
- console.log(linksArr);
- console.log(linksArr[0].hasAttribute('data-links'));
- for (var i = 0; i < linksArr.length; i++) {
- if (linksArr[0].hasAttribute('data-links')) {
- var linksList = linksArr[i].getAttribute('data-links').split(',');
- console.log(linksList);
- console.log(linksList.length);
- var index = getRandomInt(0,linksList.length);
- console.log(index);
- linksArr[i].setAttribute('href', linksList[index].trim());
- }
- }
- function getRandomInt(min, max) {
- min = Math.ceil(min);
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min)) + min;
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment