Delete build.py
[Misc-UserScripts.git] / No-You_Clicker.user.js
blob1090f84a96941b2aa91087932ad09e9d813a046a
1 // ==UserScript==
2 // @name         No-You Clicker
3 // @namespace    http://tampermonkey.net/
4 // @version      0.3
5 // @description  try to take over the world!
6 // @author       You
7 // @match        *://no-you.com/jp/*
8 // @match        http://no-you.com/jp/index.html
9 // @updateURL    https://github.com/ECHibiki/Misc-UserScripts/raw/master/No-You_Clicker.user.js
10 // @downloadURL  https://github.com/ECHibiki/Misc-UserScripts/raw/master/No-You_Clicker.user.js
11 // ==/UserScript==
13 (function() {
14     setInterval(function(){
15         var xhr = new XMLHttpRequest();
16         xhr.open('GET', "/heh.php", true);
17         xhr.responseType = 'json';
18         xhr.onload = function() {
19             var status = xhr.status;
20             if (status == 200) {
21                 var val = xhr.response;//document.getElementById("ctr").value;
22                 var digitOne = val % 10;
23                 var digitTwo = (val % 100 - digitOne)/10;
24                 console.log(val + " " + digitOne + " " + digitTwo);
25                 if(digitOne != digitTwo)
26                     document.getElementById("ctr").click();
27             }
28             else {
29                 console.log("err");
30             }
31         };
32         xhr.send();
33     }, 2000 );
34     // Your code here...
35 })();