reekside

thesimsresource.com

Jun 23rd, 2016
1,539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. var itemId = 1344533;
  2. var format = "zip";
  3. var time = "1466708642";
  4.  
  5. $(document).ready(function () {
  6. var isVis = true;
  7. if (typeof(vis) !== 'undefinend') {
  8. vis(function () {
  9. isVis = vis();
  10. });
  11. }
  12. var totalTime = 0;
  13. var waitTime = 10000;
  14. var timer = null;
  15. function countDown() {
  16. if (isAb()) {
  17. $('#adblocked').show();
  18. $('#pleasewait-adblock').show();
  19. waitTime = 60000;
  20. }
  21. if (timer)
  22. clearInterval(timer);
  23. if (!isAb() || isVis)
  24. totalTime += 1000;
  25. $('.countdown').html((waitTime - totalTime) / 1000);
  26. if (totalTime < waitTime)
  27. timer = setInterval(countDown, 1000);
  28. else {
  29. document.location.href = '/downloads/thankyou/id/' + itemId + '/format/' + format + "/sess/" + time;
  30. }
  31. }
  32. $('#downloadbutton').on('click', function () {
  33. setTimeout(function () {
  34. document.location.href = '/downloads/thankyou/id/' + itemId + '/format/' + format + "/sess/" + time;
  35. }, 1000);
  36. });
  37. countDown();
  38. });
  39.  
  40. function isAb() {
  41. if (isVIP())
  42. return false;
  43. if (typeof window.iHaveLoadedAds === 'undefined') {
  44. return true;
  45. }
  46. if (typeof window.gadsize === 'undefined') {
  47. return true;
  48. }
  49. return !(window.iHaveLoadedAds);
  50. }
  51.  
  52. (function (c) {
  53. if (c)
  54. document.addEventListener(eventKey, c);
  55. return !document[stateKey];
  56. })
Advertisement
Add Comment
Please, Sign In to add comment