Skip to content

Commit

Permalink
Update weather.js
Browse files Browse the repository at this point in the history
Added even more spaces.
  • Loading branch information
samuellouf authored Aug 5, 2023
1 parent 1cbad11 commit 96b4c20
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions extensions/SamuelLouf/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
if (args.METEO.includes('(km/h)')){
return current_weather.windspeed;
} else {
var wind_speed = current_weather.windspeed/1.609;
var wind_speed = current_weather.windspeed / 1.609;
const letters_of = (text, from, to) => {args.STRING = text.toString();args.LETTER1 = Number(from) || 0;args.LETTER2 = Number(to) || 0;return args.STRING.substring(args.LETTER1 - 1, args.LETTER2);}

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Statement inside of curly braces should be on next line

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Closing curly brace should be on the same line as opening curly brace or on the line after the previous block

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Statement inside of curly braces should be on next line

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Closing curly brace should be on the same line as opening curly brace or on the line after the previous block

Check warning on line 341 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon
const itemOfFromString = (no, from, splitby) => {var input1 = (Number(no) - 1);var input2 = String(from);var input3 = splitby;return input2.split(input3)[input1] || '';}

Check warning on line 342 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Statement inside of curly braces should be on next line

Check warning on line 342 in extensions/SamuelLouf/weather.js

View workflow job for this annotation

GitHub Actions / build

Statement inside of curly braces should be on next line
return Number(String(itemOfFromString(1, wind_speed, '.')) + '.' + letters_of(itemOfFromString(2, wind_speed, '.'), 1, 2));
Expand All @@ -362,15 +362,15 @@
} else if (args.OPERATORS == '≈'){
if (args.METEO.includes('temperature')){
if (args.METEO.includes('(C)')){
return Number(args.value)-2.5 < Number(response) && Number(response) < Number(args.value)+2.5;
return Number(args.value) - 2.5 < Number(response) && Number(response) < Number(args.value) + 2.5;
} else {
return Number(args.value)-3.6 < Number(response) && Number(response) < Number(args.value)+3.6;
return Number(args.value) - 3.6 < Number(response) && Number(response) < Number(args.value) + 3.6;
}
} else if (args.METEO.includes('wind speed')){
if (args.METEO.includes('(km/h)')){
return Number(args.value)-10 < Number(response) && Number(response) < Number(args.value)+10;
return Number(args.value) - 10 < Number(response) && Number(response) < Number(args.value) + 10;
} else {
return Number(args.value)-6.2 < Number(response) && Number(response) < Number(args.value)+6.2;
return Number(args.value) - 6.2 < Number(response) && Number(response) < Number(args.value) + 6.2;
}
}
}
Expand All @@ -385,7 +385,7 @@
if (args.METEO.includes('(C)')){
return current_weather.temperature;
} else {
var temperature = (current_weather.temperature*9/5)+32;
var temperature = (current_weather.temperature * 9 / 5 ) + 32;
const letters_of = (text, from, to) => {args.STRING = text.toString();args.LETTER1 = Number(from) || 0;args.LETTER2 = Number(to) || 0;return args.STRING.substring(args.LETTER1 - 1, args.LETTER2);}
const itemOfFromString = (no, from, splitby) => {var input1 = (Number(no) - 1);var input2 = String(from);var input3 = splitby;return input2.split(input3)[input1] || '';}
return Number(String(itemOfFromString(1, temperature, '.')) + '.' + letters_of(itemOfFromString(2, temperature, '.'), 1, 2));
Expand All @@ -396,7 +396,7 @@
if (args.METEO.includes('(km/h)')){
return current_weather.windspeed;
} else {
var wind_speed = current_weather.windspeed/1.609;
var wind_speed = current_weather.windspeed / 1.609;
const letters_of = (text, from, to) => {args.STRING = text.toString();args.LETTER1 = Number(from) || 0;args.LETTER2 = Number(to) || 0;return args.STRING.substring(args.LETTER1 - 1, args.LETTER2);}
const itemOfFromString = (no, from, splitby) => {var input1 = (Number(no) - 1);var input2 = String(from);var input3 = splitby;return input2.split(input3)[input1] || '';}
return Number(String(itemOfFromString(1, wind_speed, '.')) + '.' + letters_of(itemOfFromString(2, wind_speed, '.'), 1, 2));
Expand All @@ -417,7 +417,7 @@
if (args.METEO.includes('(C)')){
return current_weather.temperature;
} else {
var temperature = (current_weather.temperature*9/5)+32;
var temperature = (current_weather.temperature * 9 / 5) + 32;
const letters_of = (text, from, to) => {args.STRING = text.toString();args.LETTER1 = Number(from) || 0;args.LETTER2 = Number(to) || 0;return args.STRING.substring(args.LETTER1 - 1, args.LETTER2);}
const itemOfFromString = (no, from, splitby) => {var input1 = (Number(no) - 1);var input2 = String(from);var input3 = splitby;return input2.split(input3)[input1] || '';}
return Number(String(itemOfFromString(1, temperature, '.')) + '.' + letters_of(itemOfFromString(2, temperature, '.'), 1, 2));
Expand All @@ -428,7 +428,7 @@
if (args.METEO.includes('(km/h)')){
return current_weather.windspeed;
} else {
var wind_speed = current_weather.windspeed/1.609;
var wind_speed = current_weather.windspeed / 1.609;
const letters_of = (text, from, to) => {args.STRING = text.toString();args.LETTER1 = Number(from) || 0;args.LETTER2 = Number(to) || 0;return args.STRING.substring(args.LETTER1 - 1, args.LETTER2);}
const itemOfFromString = (no, from, splitby) => {var input1 = (Number(no) - 1);var input2 = String(from);var input3 = splitby;return input2.split(input3)[input1] || '';}
return Number(String(itemOfFromString(1, wind_speed, '.')) + '.' + letters_of(itemOfFromString(2, wind_speed, '.'), 1, 2));
Expand All @@ -449,15 +449,15 @@
} else if (args.OPERATORS == '≈'){
if (args.METEO.includes('temperature')){
if (args.METEO.includes('(C)')){
return Number(args.value)-2.5 < Number(response) && Number(response) < Number(args.value)+2.5;
return Number(args.value) - 2.5 < Number(response) && Number(response) < Number(args.value) + 2.5;
} else {
return Number(args.value)-3.6 < Number(response) && Number(response) < Number(args.value)+3.6;
return Number(args.value) - 3.6 < Number(response) && Number(response) < Number(args.value)+3.6;
}
} else if (args.METEO.includes('wind speed')){
if (args.METEO.includes('(km/h)')){
return Number(args.value)-10 < Number(response) && Number(response) < Number(args.value)+10;
return Number(args.value) - 10 < Number(response) && Number(response) < Number(args.value) + 10;
} else {
return Number(args.value)-6.2 < Number(response) && Number(response) < Number(args.value)+6.2;
return Number(args.value) - 6.2 < Number(response) && Number(response) < Number(args.value) + 6.2;
}
}
}
Expand Down

0 comments on commit 96b4c20

Please sign in to comment.