// ==UserScript== // @name Gamdom Rain Notifier 1.0.1 // @description WORKABLE SCRIPT, NO BAN RISK, NO MINER INSIDE. READ DESCRIPTION ON GREASYFORK.ORG // @namespace https://greasyfork.org/users/173937 // @version 1.1.0 // @author Boris Britva // @include /^https:\/\/greasyfork\.org\/([a-z]{2}(\-[A-Z]{2})?\/)?scripts/39315(\-[^\/]+)$/ // @include /^https?:\/\/gamdom\.com\/*$/ // @require https://greasyfork.org/scripts/39350-gamdom-rain-notifier-library/code/Gamdom%20Rain%20Notifier%20Library.js?version=257595 // @grant GM_xmlhttpRequest // @grant GM_notification // @grant GM_info // @connect gamdomrain.com // @downloadURL none // ==/UserScript== window.GM_notification = window.GM_notification || function(){console.log.apply(null, arguments);}; (function(){ console.log("start playing the game"); if( location.hostname == 'gamdom.com' ) return; main(); //playback(1);// test sound GM_notification({ title: info() + " starts..", text: "Just leave this page open, and you'll get all notifications", highlight: true, timeout: 1e4, }); })(); function notify(r) { return console.log("grn..", (Date.now() - time)/1e3, "sec", r == 4 ? "it's raining!" : ""), (r && r == 4) ? (GM_notification({ title: "[" + info() + "]: IT IS RAINING!", text: "GO TO GAMDOM.COM AND CHASE IT", highlight: true, timeout: 5e3, }), !0) : !1; } function info(){return GM_info.script.name + " v" + GM_info.script.version;} function dmail(details) { return new Promise(function(resolve, reject){ details.method = details.method || "GET"; details.onload = function(r){ if( r.status != 200 ) reject(r.statusText); else resolve(r.response); }; var h = details.headers = {}; h.referer = details.url.replace(/(https?\:)\/\/([^\/\?\#]+)([^\?\#]+)/, '$1//$2/detector'); GM_xmlhttpRequest(details); }); } function get(){url().then(dmial).then(len).then(notify).then(playback);} function dmial(u){return dmail({url: u});} function len(a){return a.length;} function main(){time = Date.now(); setInterval(get, 8e3); console.log("just for lulz =)");}