From 270ebb8e35bf140204d01fb1d7c92f20ef508200 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sun, 8 Nov 2015 12:15:52 +0000 Subject: [PATCH] 02_RSS: new attribute noscroll git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9821 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- CHANGED | 1 + FHEM/02_RSS.pm | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGED b/CHANGED index c8cae81bd..8be039957 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 02_RSS: new attribute noscroll - feature: 98_help: replace anchor links in help output with a working link to local commandref or fhem.de - bugfix: 70_XBMC: reworked RPC ID generation diff --git a/FHEM/02_RSS.pm b/FHEM/02_RSS.pm index 60b0e6d4b..eb4be95ef 100644 --- a/FHEM/02_RSS.pm +++ b/FHEM/02_RSS.pm @@ -56,7 +56,7 @@ RSS_Initialize($) { $hash->{DefFn} = "RSS_Define"; $hash->{UndefFn} = "RSS_Undefine"; #$hash->{AttrFn} = "RSS_Attr"; - $hash->{AttrList} = "size bg bgcolor tmin refresh areas autoreread:1,0 viewport"; + $hash->{AttrList} = "size bg bgcolor tmin refresh areas autoreread:1,0 viewport noscroll"; $hash->{SetFn} = "RSS_Set"; $hash->{NotifyFn} = "RSS_Notify"; @@ -299,11 +299,13 @@ RSS_returnHTML($) { my $type = $defs{$name}{fhem}{style}; my $img= "$url/rss/$name.$type"; my $refresh= AttrVal($name, 'refresh', 60); + my $noscroll= AttrVal($name, 'noscroll', 0); + my $overflow= $noscroll ? " style=\"overflow:hidden\"" : ""; my $areas= AttrVal($name, 'areas', ""); my $embed= $defs{$name}{".embed"}; my $r= (defined($refresh) && ($refresh> 0)) ? " onload=\"setTimeout(function(){reloadImage(\'img0\')},$refresh*1000);\"" : ""; my $code= RSS_HTMLHead($name, $refresh) . - "\n" . + "\n" . "
\n" . "\n" . "\n$areas\n\n" . @@ -1006,6 +1008,8 @@ plotFromUrl(@) Example: attr FrameRSS viewport width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0
This scales the image to fit to the browser's viewport and inhibits zooming in or out on tablets.
+
  • noscroll
    Suppresses scrollbars in browsers, if set to 1. +

  • areas
    HTML code that goes into the image map.
    Example: attr FrameRSS areas <area shape="rect" coords="0,0,200,200" href="http://fhem.de"/><area shape="rect" coords="600,400,799,599" href="http://has:8083/fhem" target="_top"/>