var num = 420000; // 7 min
var refreshSite;
refreshSiteInterval();
if (sessionStorage.getItem('numRefresh') == null) {
sessionStorage.setItem("numRefresh", "1");
}
function refreshSiteInterval() {
const now = new Date();
console.log('Last refreshSite in: ' now);
var nextRefreshTime = new Date(now.setMilliseconds(now.getMilliseconds() num));
console.log('Next refreshSite in: ' nextRefreshTime);
refreshSite = setInterval(function () {
var numRefreshInSession = parseInt(sessionStorage.getItem("numRefresh"));
sessionStorage.setItem("numRefresh", (numRefreshInSession 1));
document.location = document.location;
}, num);
};
function stopRefreshSite() {
clearInterval(refreshSite);
console.log('Stop Refresh Site activated');
}
The Jerusalem Post - Jpost.com Israel News
The Jerusalem Post Is the leading english news source of American jewry. Jpost.com is its online version.It delivers Israel News, Arab and Israeli conflict updates, and news about the Jewish life both in Israel and in the diaspora.