Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name 초이스 랜덤 번호 자동 투표 후 닫기
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description try to take over the world!
  6. // @author 할붕이
  7. // @match https://m.kin.naver.com/mobile/choice/detail?*
  8. // @grant window.close
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. function aaa(bbb) {
  13. return document.evaluate(bbb, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  14. }
  15. setTimeout(function() {
  16. var i = 0;
  17. var a = document.getElementById(i);
  18. while(a != null){
  19. var a = document.getElementById(i);
  20. i++;
  21. };
  22. if($('.choiceButton').text()!="다시 투표하기"){
  23. var num = Math.floor(Math.random() * i);
  24. document.getElementById(num).click();
  25. aaa("//html/body/div[2]/div/div[1]/div[2]/div[2]/button").click();
  26. window.close();
  27. }else{
  28. window.close();
  29. }
  30. }, 200)
  31. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement