SHARE
TWEET

dddddd

a guest Aug 27th, 2013 82 Never
  1. 1. Modify https://primedice.com/modals/free-btc.html code to show label like:
  2. Code:
  3. <label class="bitcoin__address text--center-force" id = "return_text">You can claim the bitcoin bonus in <span id = "captcha_counter">10</span> seconds.</label>
  4.  
  5. instead of
  6. Code:
  7. <label class="bitcoin__address text--center-force">You can claim the bitcoin bonus in 10 seconds.</label>
  8.  
  9. so just add id to label and span inside content, where current amount of seconds goes. No changes needed for "You can claim the bitcoin bonus now!" and "You need balance lower than (...)" as script will just stop working when element with id captcha_counter doesn't exists.
  10. 2. Add this:
  11. Code:
  12. <script language = "JavaScript">
  13.         var interfunc = setInterval(function(){
  14.                 if(document.getElementById('captcha_counter') === null){
  15.                         clearInterval(interfunc);
  16.                 }
  17.                 var seconds = document.getElementById('captcha_counter').innerHTML;
  18.                 if(seconds > 0){
  19.                         seconds--;
  20.                         document.getElementById('captcha_counter').innerHTML = seconds;
  21.                 }
  22.                 else {
  23.                         document.getElementById('return_text').innerHTML = 'You can claim the bitcoin bonus now!';
  24.                         clearInterval(interfunc);
  25.                 }
  26.         }, 1000);
  27. </script>
  28.  
  29. right after label, so in PHP it'll look like
  30. Code:
  31. echo '<label class="bitcoin__address text--center-force" id = "return_text">'.$blahblahtext.'</label>
  32. <script language = "JavaScript">
  33.         var interfunc = setInterval(function(){
  34.                 if(document.getElementById('captcha_counter') === null){
  35.                         clearInterval(interfunc);
  36.                 }
  37.                 var seconds = document.getElementById('captcha_counter').innerHTML;
  38.                 if(seconds > 0){
  39.                         seconds--;
  40.                         document.getElementById('captcha_counter').innerHTML = seconds;
  41.                 }
  42.                 else {
  43.                         document.getElementById('return_text').innerHTML = 'You can claim the bitcoin bonus now!';
  44.                         clearInterval(interfunc);
  45.                 }
  46.         }, 1000);
  47. </script>
  48.  
  49. 3. Done!
RAW Paste Data
Top