Created
April 22, 2015 09:10
-
-
Save atme/3c26cefdb41912675ba3 to your computer and use it in GitHub Desktop.
Autobump for csgolounge.com
This file contains hidden or 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
| // ==UserScript== | |
| // @name csgolounge-autobump | |
| // @namespace csgoloungeAutobump | |
| // @include http://csgolounge.com/mytrades | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| /*global $, console*/ | |
| (function ($) { | |
| 'use strict'; | |
| var i, trades = []; | |
| $('.tradepoll').each(function (i, element) { | |
| trades.push($(element).attr('id').substr(5)); | |
| }); | |
| function updateTrades() { | |
| for (i = 0; i < trades.length; i += 1) { | |
| bumpTrade(trades[i]); | |
| } | |
| setTimeout(updateTrades, 1000 * 60 * 10 * (Math.random() * 2)); | |
| console.log('Trades is updated.'); | |
| } | |
| setTimeout(updateTrades, 1000 * 60 * 10 * (Math.random() * 2)); | |
| }($)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment