allow location property in config,js to be used as header

This commit is contained in:
Jesse Alltop
2019-06-26 19:31:16 -05:00
parent 37417fa1bb
commit f76a7fb331
3 changed files with 7 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ Module.register("currentweather",{
showWindDirection: true,
showWindDirectionAsArrow: false,
useBeaufort: true,
appendLocationNameToHeader: false,
useKMPHwind: false,
lang: config.language,
decimalSymbol: ".",
@@ -269,6 +270,10 @@ Module.register("currentweather",{
return this.data.header + " " + this.fetchedLocationName;
}
if (this.config.useLocationAsHeader && this.config.location !== false) {
return this.config.location;
}
return this.data.header;
},