From: Andrew Dolgov Date: Thu, 12 Feb 2009 10:59:00 +0000 (+0300) Subject: offline: automatically set version of manifest.json (using filemtime) X-Git-Tag: 1.3.1~31 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0cd6bb46f7d8b8c11a8704603f9816e9f78d1ec9;p=tt-rss.git offline: automatically set version of manifest.json (using filemtime) --- diff --git a/functions.js b/functions.js index 5c056489..8355deb0 100644 --- a/functions.js +++ b/functions.js @@ -458,6 +458,13 @@ function parse_counters(reply, scheduled_call) { var xmsg = elems[l].getAttribute("xmsg"); if (id == "global-unread") { + + if (ctr > global_unread) { + if (db && getInitParam("offline_enabled") == "1") { + window.setTimeout("update_offline_data(0)", 100); + } + } + global_unread = ctr; updateTitle(); continue; diff --git a/manifest.json.php b/manifest.json.php new file mode 100644 index 00000000..22ea4cda --- /dev/null +++ b/manifest.json.php @@ -0,0 +1,96 @@ + $mtime) { + $mtime_max = $tmp; + } + + array_push($manifest_formatted, "{ \"url\": \"$f\" }"); + } +?> + +{ + "betaManifestVersion": 1, + "version": "", + "entries": [ + + ] +} diff --git a/offline.js b/offline.js index f20559f2..e6b77ed7 100644 --- a/offline.js +++ b/offline.js @@ -974,7 +974,7 @@ function init_gears() { if (window.google && google.gears) { localServer = google.gears.factory.create("beta.localserver"); store = localServer.createManagedStore("tt-rss"); - store.manifestUrl = "manifest.json"; + store.manifestUrl = "manifest.json.php"; store.checkForUpdate(); db = google.gears.factory.create('beta.database');