Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @id FixMarket12321321
// @name FixMarket
// @version 1.0
// @namespace AB
// @author Pilate
// @description Fixes broken item tooltips on market pages
// @include http://steamcommunity.com/market/*
// @run-at document-end
// ==/UserScript==
@JPustkuchen
JPustkuchen / autoreload.js
Last active October 11, 2024 09:45
JavaScript jQuery Page Auto Reload Timer with enable / disable checkbox
<script>
$( document ).ready(function() {
window.setInterval(function() {
if($('#autoreload').is(':checked')){
if(('#autoreload-wrapper .countdown').length && (parseInt($('#autoreload-wrapper .countdown').text()) <= 1)){
// Reload every 60 seconds without sending POST again:
window.location.href = window.location.href;
} else {
$('#autoreload-wrapper .countdown').text(parseInt($('#autoreload-wrapper .countdown').text()) - 1);
}