Posted  by  admin

Steamtrades

  1. Trade Code Steam
  2. Steam Trades Hold
SteamTrades Auto Bump
  1. Search reputation. Trade safely and view 1,389,992 reviews for Steam users, or write your own.
  2. Community Wishlist. Search for new games to share.

The latest tweets from @StephenKing.

// UserScript
// @name SteamTrades Auto Bump
// @namespace ST_AUTOBUMP
// @author LBLZR_
// @description Bumps the post every 60 minutes + random drift
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @include https://*.steamtrades.com/trade/*
// /UserScript
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function scheduleReload(seconds){
//we add a random drift to the time
seconds += getRandomInt(10, 150);
console.log('Reload scheduled after ' + seconds + ' seconds...');
setTimeout(function(){
window.location.reload(1);
}, seconds*1000);
}
$(function() {
if($('.dropdown_btn.js_trade_bump').length>0){
var bumpTime = 3600;
$.ajax({
method: 'POST',
url: '/ajax.php',
dataType: 'json',
data: $('.dropdown_btn.js_trade_bump').data('form')
}).done(function(e) {
if(e.success){
console.log('Bumped...');
scheduleReload(bumpTime);
}else{
console.log('Bump failed, we probably bumped this thread recently...');
var delay = /Please wait another (d+) minute/g.exec(e.popup_heading_h2);
console.log(e.popup_heading_h2);
if(delay != null && delay.length > 1){
bumpTime -= (60-Number(delay[1]))*60;
scheduleReload(bumpTime);
}else{
console.log('Could not find the wait time...');
scheduleReload(bumpTime);
}
}
});
}else{
console.log('This is probably not our trade, not bumping...');
}
});

commented Nov 16, 2019

Hello. I use Tampermonkey / Edge.

Your script only works when the Edge-Tab (page) is active. If I view another tab or my browser is minimized, it will not work. It will work when I open the tab.

I checked some other scripts, they can work in the background. For example, this script (which just refreshes the page) works with inactive tabs: setTimeout(function(){ location.reload(); }, 10006065);

Is there any chance to update code? I tried to do it myself, but it did not work out. Thanks.

Trade Code Steam

commented Nov 17, 2019

Steamtrades

Maybe detach the tab and run it in separate window or use a different browser? Another option would probably be to use a js service worker but I'm not exactly sure how to get that working with grease/tampermonkey...

This script is pretty old and I'm not involved in Steam trading anymore so I don't think there's any point in improving it 🤷‍♂️.

Steam Trades Hold

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment