hunostor

portfolio vote

Nov 15th, 2021
984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var CookieUtil = {
  2.   createCookie:function(name,value,days) {
  3.     if (days) {
  4.         var date = new Date();
  5.         date.setTime(date.getTime()+(days*24*60*60*1000));
  6.         var expires = "; expires="+date.toGMTString();
  7.     }
  8.     else var expires = "";
  9.     document.cookie = name+"="+value+expires+"; path=/";
  10.   },
  11.   existsCooke: function(name) {
  12.     var result = this.readCookie(name);
  13.     if(result === null) return false;
  14.     return true;
  15.   },
  16.   readCookie:function(name) {
  17.     var nameEQ = name + "=";
  18.     var ca = document.cookie.split(';');
  19.     for(var i=0;i < ca.length;i++) {
  20.         var c = ca[i];
  21.         while (c.charAt(0)==' ') c = c.substring(1,c.length);
  22.         if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  23.     }
  24.     return null;
  25.   },
  26.   eraseCookie:function(name) {
  27.     this.createCookie(name,"",-1);
  28.   }
  29. }
  30.  
  31. if(CookieUtil.existsCooke("PfPoll")) {
  32.     CookieUtil.eraseCookie("PfPoll");
  33.     location.reload();
  34. }
  35.  
  36. var element = document.querySelector("[value=\"844\"]");
  37. element.click();
  38. var buttonWrapper = document.querySelector("[class=\"poll-footer\"]");
  39. var voteButton = buttonWrapper.querySelector('button');
  40. voteButton.click();
  41. location.reload();
  42.  
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment