Advertisement
NewBestPastebins

Matfessor level-up

Mar 5th, 2024
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. var tspanElement = document.querySelector('tspan');
  2. var trophiesElement = document.querySelector('.frontpageMedals .graphicMedals');
  3. var currentValue = 104;
  4. var trophyCount = 0;
  5. var intervalId = setInterval(function() {
  6. if (tspanElement) {
  7. tspanElement.textContent = currentValue;
  8. }
  9. currentValue++;
  10. if (currentValue % 50 === 0) {
  11. var newTrophy = document.createElement('span');
  12. newTrophy.className = 'trophy';
  13. trophiesElement.appendChild(newTrophy);
  14. trophyCount++;
  15. }
  16.  
  17. if (currentValue > 69420) {
  18. clearInterval(intervalId);
  19. }
  20. }, 10);
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement