Skip to content

Instantly share code, notes, and snippets.

@Committing
Last active January 24, 2016 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Committing/6602263be8eae1cbda59 to your computer and use it in GitHub Desktop.
Save Committing/6602263be8eae1cbda59 to your computer and use it in GitHub Desktop.
CSGO Lounge Auto-Refresher
$(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