Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. if( window.canRunAds === undefined ){
  2. location.href="block.php?url="+location.href;
  3. }
  4.  
  5.  
  6. function getReward(id) {
  7. requestData=window.location.href.split("?")[1]+"&id="+id;
  8. //Przenieś to do PHP i przekaż URL składany tutaj
  9. $.ajax({
  10. type: "POST",
  11. async: false,
  12. url: 'rw.php',
  13. dataType: 'json',
  14. data: {functionname: 'rw', arguments: [requestData]},
  15. success: function(data) {}
  16. });
  17. }
  18.  
  19. function lockClick(){
  20. document.getElementById('ad1').onclick=null;
  21. document.getElementById('ad2').onclick=null;
  22. }
  23.  
  24. function lockButton(){
  25. if(!vid){
  26. alert("Wykryto próbę oszustwa! Odśwież stronę i obejrzyj wideo jeszcze raz!");
  27. } else {
  28. var monitor = setInterval(function(){
  29. var elm = document.activeElement;
  30. if(elm && !elm.id.startsWith("player") && !elm.id.startsWith("google_") && elm.nodeName == "IFRAME"){
  31. getReward(0);
  32. clearInterval(monitor);
  33. }
  34. }, 100);
  35. alert("Teraz kliknij na dowolną reklamę!");
  36. }
  37. }
  38.  
  39. var ytscr = document.createElement('script');
  40. ytscr.src = "https://www.youtube.com/iframe_api";
  41. var ytscr_tag = document.getElementsByTagName('script')[0];
  42. ytscr_tag.parentNode.insertBefore(ytscr, ytscr_tag);
  43.  
  44. function onYouTubeIframeAPIReady() {
  45. player = new YT.Player('player', {
  46. videoId: 'u6fwuwfzQ6M',
  47. width: '860',
  48. height: '484',
  49. playerVars: {'enablejsapi':1},
  50. events: {
  51. 'onReady': onPlayerReady,
  52. 'onStateChange': onPlayerStateChange
  53. }
  54. });
  55. }
  56.  
  57. function onPlayerReady(event) {
  58. }
  59.  
  60. function onPlayerStateChange(event) {
  61. if(event.data === 0) {
  62. lockButton(vid=1);
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement