// ==UserScript== // @name css-refresh // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @require http://cdn.bootcss.com/crypto-js/3.1.2/rollups/sha1.js // @match http://m.kankan.com/v/* // @match http://127.0.0.1:8083/* // @match http://192.168.28.52:8083/* // @run-at document-idle // @grant GM_xmlhttpRequest // ==/UserScript== /* eslint-disable */ (function (){ 'use strict'; setInterval(()=>{ GM_xmlhttpRequest({ method: "GET", url: 'http://192.168.1.1/Main_LogStatus_Content.asp' + "?" + Math.random(), onload: function (response){ var last = localStorage.getItem('lastscript'); var str = response.responseText; var sha = CryptoJS.SHA1(str).toString(); //console.log(sha); localStorage.setItem('lastscript', sha + ''); if( last != sha ) window.location.reload(); } }); }, 500); })();