From 0026b55d3ae404e755d8b6a8e9e11b114f45cc24 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sat, 11 Jul 2015 14:29:59 +0000 Subject: [PATCH] 02_RSS: replaced refresh method by javascript DOM gymnastics git-svn-id: https://svn.fhem.de/fhem/trunk@8940 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/RSS.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 fhem/www/pgm2/RSS.js diff --git a/fhem/www/pgm2/RSS.js b/fhem/www/pgm2/RSS.js new file mode 100644 index 000000000..104591b47 --- /dev/null +++ b/fhem/www/pgm2/RSS.js @@ -0,0 +1,9 @@ +// reload image with id +function reloadImage(id) { + // we use a dummy query to trick the browser into reloading the image + var d = new Date(); + var q = '?t=' + d.getTime(); + var image = document.getElementById(id); + var url = image.getAttribute('src'); + image.setAttribute('src', url.replace(/\?.*/,'') + q ); +}