// Only on issues listif(/^(\/issues\/)/i.test(location.pathname)){varAutoRefreshIssuesList=AutoRefreshIssuesList||{};// Main functionAutoRefreshIssuesList.init=function(){// Wait until page is loadedAJS.toInit(function(){// Wait for 60 seconds before calling setInterval which fires immediatelysetTimeout(function(){// Refresh table every 60 secondssetInterval(function(){AutoRefreshIssuesList.refresh();},60000);},60000);});};// Refresh function - must use this to again test URL since AJAX can otherwise allow refreshes where we don't wantAutoRefreshIssuesList.refresh=function(){if(/^(\/issues\/)/i.test(location.pathname)){AJS.$(".refresh-table").click();}}// Fire on initial page loadAutoRefreshIssuesList.init();}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.