diff --git a/fhem/www/pgm2/f18style.css b/fhem/www/pgm2/f18style.css index 898288833..b16d47759 100644 --- a/fhem/www/pgm2/f18style.css +++ b/fhem/www/pgm2/f18style.css @@ -27,6 +27,12 @@ input.maininput { margin-left:10px; } } #menu > table td { padding-top: 2px; } +/* Hide the scrollbar for fixed input */ +body.fixedInput[data-os=linux] div#content::-webkit-scrollbar {display:none;} +body.fixedInput[data-os=linux] div#menu::-webkit-scrollbar {display:none;} +body.fixedInput[data-os=windows] div#content::-webkit-scrollbar {display:none;} +body.fixedInput[data-os=windows] div#menu::-webkit-scrollbar {display:none;} + #menu.hidden { left:-120%!important; } #console { width:100%; top:2em; bottom:0px; position:absolute; overflow-y:auto;} #errmsg { background-color: #000000; color: #FFFFFF; diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index e57bc7d53..c267c42f1 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -13,6 +13,14 @@ var FW_root = "/fhem"; // root var FW_availableJs={}; var FW_urlParams={}; var embedLoadRetry = 100; +var FW_os = "unknown"; + +if(FW_isiOS) { FW_os = "iOS"; +} else if(navigator.userAgent.indexOf("Android") >= 0) { FW_os = "android"; +} else if(navigator.userAgent.indexOf("OS X") >= 0) { FW_os = "osx"; +} else if(navigator.userAgent.indexOf("Windows") >= 0) { FW_os = "windows"; +} else if(navigator.userAgent.indexOf("Linux") >= 0) { FW_os = "linux"; +} // createFn returns an HTML Element, which may contain // - setValueFn, which is called when data via longpoll arrives @@ -72,6 +80,8 @@ FW_jqueryReadyFn() return; FW_docReady = true; FW_serverGenerated = $("body").attr("generated"); + if(!FW_serverGenerated) // called from commandref.html + return; FW_longpollType = $("body").attr("longpoll"); var ajs = $("body").attr("data-availableJs"); if(ajs) { @@ -309,6 +319,7 @@ FW_jqueryReadyFn() FW_rawDef(); FW_treeMenu(); + $("body").attr("data-os", FW_os); // automatic reload for style change if(location.search.indexOf("cmd=style%20select") > 0) { $('a[href*="style set"],a[onclick*="style set"]').each(function(){