Skip to content

Commit

Permalink
Merge pull request #207 from xPaw/remove-injectjs
Browse files Browse the repository at this point in the history
Remove g_bMarketWindowHidden hack
  • Loading branch information
Nuklon authored Jul 14, 2024
2 parents c6d0256 + 8bc2ce1 commit 2c15ffa
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2408,12 +2408,6 @@
});
}, 1);

marketListingsQueue.drain = function() {
injectJs(function() {
g_bMarketWindowHidden = false;
})
};

// Gets the price, in cents, from a market listing.
function getPriceFromMarketListing(listing) {
var priceLabel = listing.trim().replace('--', '00');
Expand Down Expand Up @@ -2817,11 +2811,6 @@
myMarketListings.show();

fillMarketListingsQueue();

injectJs(function() {
g_bMarketWindowHidden =
true; // Limits the number of requests made to steam by stopping constant polling of popular listings.
});
};


Expand Down Expand Up @@ -3708,14 +3697,6 @@
head.appendChild(style);
}

function injectJs(js) {
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = '(' + js + ')();';
document.body.appendChild(script);
document.body.removeChild(script);
}

$.fn.delayedEach = function(timeout, callback, continuous) {
var $els, iterator;

Expand Down

0 comments on commit 2c15ffa

Please sign in to comment.