Remove unused vars and whitelines, cleanups

This commit is contained in:
Veeck 2017-06-02 19:35:10 +02:00
parent 9f61256e5e
commit 20687d915a
2 changed files with 2 additions and 7 deletions

View File

@ -127,7 +127,6 @@ Module.register("clock",{
hour = ((now.hours() % 12) / 12) * 360 + 90 + minute / 12; hour = ((now.hours() % 12) / 12) * 360 + 90 + minute / 12;
// Create wrappers // Create wrappers
var wrapper = document.createElement("div");
var clockCircle = document.createElement("div"); var clockCircle = document.createElement("div");
clockCircle.className = "clockCircle"; clockCircle.className = "clockCircle";
clockCircle.style.width = this.config.analogSize; clockCircle.style.width = this.config.analogSize;

View File

@ -115,7 +115,6 @@ Module.register("currentweather",{
var small = document.createElement("div"); var small = document.createElement("div");
small.className = "normal medium"; small.className = "normal medium";
var windIcon = document.createElement("span"); var windIcon = document.createElement("span");
windIcon.className = "wi wi-strong-wind dimmed"; windIcon.className = "wi wi-strong-wind dimmed";
small.appendChild(windIcon); small.appendChild(windIcon);
@ -247,10 +246,9 @@ Module.register("currentweather",{
if (notification === "CALENDAR_EVENTS") { if (notification === "CALENDAR_EVENTS") {
var senderClasses = sender.data.classes.toLowerCase().split(" "); var senderClasses = sender.data.classes.toLowerCase().split(" ");
if (senderClasses.indexOf(this.config.calendarClass.toLowerCase()) !== -1) { if (senderClasses.indexOf(this.config.calendarClass.toLowerCase()) !== -1) {
var lastEvent = this.firstEvent;
this.firstEvent = false; this.firstEvent = false;
for (e in payload) { for (var e in payload) {
var event = payload[e]; var event = payload[e];
if (event.location || event.geo) { if (event.location || event.geo) {
this.firstEvent = event; this.firstEvent = event;
@ -348,11 +346,10 @@ Module.register("currentweather",{
if (this.config.useBeaufort){ if (this.config.useBeaufort){
this.windSpeed = this.ms2Beaufort(this.roundValue(data.wind.speed)); this.windSpeed = this.ms2Beaufort(this.roundValue(data.wind.speed));
}else { } else {
this.windSpeed = parseFloat(data.wind.speed).toFixed(0); this.windSpeed = parseFloat(data.wind.speed).toFixed(0);
} }
this.windDirection = this.deg2Cardinal(data.wind.deg); this.windDirection = this.deg2Cardinal(data.wind.deg);
this.windDeg = data.wind.deg; this.windDeg = data.wind.deg;
this.weatherType = this.config.iconTable[data.weather[0].icon]; this.weatherType = this.config.iconTable[data.weather[0].icon];
@ -385,7 +382,6 @@ Module.register("currentweather",{
this.sunriseSunsetTime = timeString; this.sunriseSunsetTime = timeString;
this.sunriseSunsetIcon = (sunrise < now && sunset > now) ? "wi-sunset" : "wi-sunrise"; this.sunriseSunsetIcon = (sunrise < now && sunset > now) ? "wi-sunset" : "wi-sunrise";
this.show(this.config.animationSpeed, {lockString:this.identifier}); this.show(this.config.animationSpeed, {lockString:this.identifier});
this.loaded = true; this.loaded = true;
this.updateDom(this.config.animationSpeed); this.updateDom(this.config.animationSpeed);