sanath

vote sanaaa

  1. // ==UserScript==
  2. // @name sanath
  3. // @namespace sanath
  4. // @include http://www.cricket.com.au/news/odi-goat-sachin-tendulkar-india-sanath-jayasuria-sri-lanka-semi-final-1/2016-05-14
  5. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  6. // @version 4
  7. // @description vote sanaaa
  8. // ==/UserScript==
  9.  
  10.  
  11.  
  12. $(document).ready(function(){
  13.  
  14. round=0;
  15.  
  16.  
  17.  
  18.  
  19. var voteSana= function(){
  20.  
  21. round++;
  22.  
  23. votesPerRound= 30; //
  24. for (i = 0; i <votesPerRound; i++) {
  25. PollAnswer = {
  26. PollId: 'b26ba54c-4616-4d66-b88b-fed2784bc8a0' ,
  27. PollAnswerId: 'ba20defa-4d7c-4d38-a965-f04a627b95a1',
  28. PollAnswerTotal: 0,
  29. CreateDate: null,
  30. LastUpdated: null,
  31. };
  32.  
  33. $.ajax({
  34. type: 'POST',
  35. async: true,
  36. contentType: 'application/json; charset=utf-8',
  37. dataType: "json",
  38. url: 'http://www.cricket.com.au/cricketcomau/Polls/SubmitPollAnswers',
  39. data: JSON.stringify(PollAnswer),
  40. success: function(data){
  41. //$(".poll-answers .answer, .vote").hide();
  42. //$(".poll-answers .ansScore, .voted").show();
  43. //$("#totalVotes").text(data.TotalVotes + " VOTES");
  44.  
  45. }
  46. });
  47. }
  48.  
  49. //$("#pollGraph").append("<p>My VOTES "+round*50+"</br></p>");
  50.  
  51.  
  52.  
  53.  
  54. };
  55.  
  56. $("#pollGraph").append("<p>My VOTES</br></p>");
  57. setInterval(voteSana,50000); //50s to 50s
  58.  
  59.  
  60. });
  61.