// ==UserScript== // @name SteamCompanion AutoJoin // @namespace http://s3rxus.com // @version 0.2 // @description Auto join SteamCompanion // @author Sergio Susa // @match https://steamcompanion.com/gifts/search/?type=public&mode=single // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js // @downloadURL none // ==/UserScript== $(document).ready(function() { if ($(".points")[0].innerHTML < 10) { setInterval(function(){ window.location.reload(); }, 3600000); return; } if(document.URL.indexOf("search") != -1 ) { var links = $(".giveaway-links"); for(var x = 0 ; x < links.length && x < 8 ; x++ ) { if (links[x].style.opacity != "0.5") { window.open(links[x].href); } } } else { $("#enter-giveaway").click(); setInterval(function(){ window.close(); }, 10000); } });