Feels Like: Difference between revisions

m
You need to include something like the script that appears at the bottom of the standard gaugesT.htm in respect of defining temperature, humidity and wind speed:
==HTML code to translate web tags to JavaScript variables (as modified for additional parameters)==
This is needed on any web page if you want to use the new script.
<pre><script>/* -------------------------------- Convert Cumulus tags into Javascript variables for selecting 'Feels Like' parameter------------------------------------- */
var tempscale= "<#tempunitnodeg>"; // This is temperature unit, it contains F or C (without the HTML code for degree because JavaScript cannot understand it)
var winddata = new Array("<#wgust>","<#bearing>","<#wspeed>","<#avgbearing>","<#wgustTM>", "<#windunit>", "<#bearingTM>&#176; at <#TwgustTM>");/* WIND SPEEDS (latest gust, its bearing, average wind speed, average bearing, maximum gust today, unit for wind speeds, bearing of maximum gust today with symbol for degrees, time of maximum gust) */
</script></pre>
 
== HTML amendment to call new script ==
Supposing you stored the new script below in a file called "temperature.js" in the same directory as the calling html, then the HTML needs a call to the new script (insert just before the end of the HTML body) like this:
5,838

edits