Last active
January 24, 2016 22:06
-
-
Save Committing/6602263be8eae1cbda59 to your computer and use it in GitHub Desktop.
CSGO Lounge Auto-Refresher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
if (window.location.pathname == '/mytrades') { | |
function log_message(message, color) { | |
var sm = $('#submenu'); | |
sm.prepend('<strong style="border-top: 1px solid white;width:188px;display:inline-block;padding:8px 0 8px 10px;color:white;background-color: ' + color + ';">' + message + '</strong><br />'); | |
console.log(message); | |
$('title').html(message); | |
$('body').css({ backgroundColor: color }); | |
} | |
log_message('Starting checks...', 'black'); | |
setInterval(function(){ | |
var br = $('div:not(#modalPreview) .buttonright'); | |
if (br.length > 0) { | |
$('a.buttonright')[0].click(); | |
log_message('Bump button found!', '#15CD72'); | |
$('body').css({ backgroundColor: 'red' }); | |
location.reload(); | |
} else { | |
log_message('No bump button found... yet', 'black'); | |
} | |
}, 7000); | |
setTimeout(function() { | |
location.reload(); | |
}, 9000); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment