From: Andrew Dolgov Date: Mon, 25 Mar 2013 12:07:39 +0000 (+0400) Subject: add a knob to disable reload on js change X-Git-Tag: 1.7.6~305 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4cdb81737a5a92245c95ce8d38fddc13635e1d26;p=tt-rss.git add a knob to disable reload on js change --- diff --git a/include/functions.php b/include/functions.php index 32fc5ae2..9a3ea431 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2039,6 +2039,7 @@ $data['cdm_expanded'] = get_pref($link, 'CDM_EXPANDED'); $data['dep_ts'] = calculate_dep_timestamp(); + $data['reload_on_ts_change'] = !defined('_NO_RELOAD_ON_TS_CHANGE'); if (file_exists(LOCK_DIRECTORY . "/update_daemon.lock")) { diff --git a/js/tt-rss.js b/js/tt-rss.js index eaa1f3da..54ac077f 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -447,7 +447,7 @@ function parse_runtime_info(data) { } if (k == "dep_ts" && parseInt(getInitParam("dep_ts")) > 0) { - if (parseInt(getInitParam("dep_ts")) < parseInt(v)) { + if (parseInt(getInitParam("dep_ts")) < parseInt(v) && getInitParam("reload_on_ts_change")) { window.location.reload(); } }