mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-04-19 15:27:40 +00:00
ecosia widget
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
6f5bff8165
commit
e3d321f2c9
3 changed files with 14 additions and 4 deletions
|
@ -6,7 +6,10 @@
|
|||
let widgetInputRAW = args.widgetParameter;
|
||||
let token;
|
||||
if (widgetInputRAW !== null) {
|
||||
token = widgetInputRAW.toString();
|
||||
token = widgetInputRAW.toString().trim();
|
||||
if (/^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/.text(token) === false) {
|
||||
throw new Errpr('Invalid Token Format')
|
||||
}
|
||||
} else {
|
||||
throw new Error('No token set via widget parameter! You can request a token here: https://www.ecosia.org/account/login')
|
||||
}
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||

|
||||

|
||||
|
||||
This widget allows you to save the location of your car, which will then displayed in the widget as a map. So you know exactly where you parked.
|
||||
If you don't know the way to the car anymore, you can start the navigation to the car's location with one click and let Apple Maps or Google Maps navigate you.
|
||||
This widget shows how many trees you have already planted based on your searches on Ecosia.org.
|
||||
Clicking on the widget will open Ecosia.org in your browser.
|
||||
|
||||
[[Download]](https://raw.githubusercontent.com/ThisIsBenny/iOS-Widgets/main/Ecosia/Ecosia.js)
|
||||
|
||||
## Setup
|
||||
For this widget is a ecosia account required. Go to https://www.ecosia.org/account/login and enter your E-Mail address. You will recieve a E-Mail with a link.
|
||||
Use this Link on all your devices where you use Ecosia to connect all Devices to one counter (you can request the Mail multiple time, import is that the E-Mail address is always the same).
|
||||
After this, you have to copy the token from the Link in the E-Mail and paste the token to the widget parameter
|
||||
After this, you have to copy the token from the Link in the E-Mail and paste the token to the widget parameter. The Token is the part behind `https://www.ecosia.org/account/verify?token=[TOKEN]` in the url:
|
||||
|
||||

|
||||

|
|
@ -14,6 +14,13 @@
|
|||
"previewURL": "https://raw.githubusercontent.com/ThisIsBenny/iOS-Widgets/main/Covid-19/previewLight.jpeg",
|
||||
"descriptionURL": "https://github.com/ThisIsBenny/iOS-Widgets/blob/main/Covid-19/README.md"
|
||||
},
|
||||
{
|
||||
"name": "Ecosia Tree Counter",
|
||||
"version": "1.0.0",
|
||||
"scriptURL": "https://raw.githubusercontent.com/ThisIsBenny/iOS-Widgets/main/Ecosia/Ecosia.js",
|
||||
"previewURL": "https://raw.githubusercontent.com/ThisIsBenny/iOS-Widgets/main/Ecosia/previewLight.jpeg",
|
||||
"descriptionURL": "https://github.com/ThisIsBenny/iOS-Widgets/blob/main/Ecosia/README.md"
|
||||
},
|
||||
{
|
||||
"name": "Meeting dial in",
|
||||
"version": "0.1.1",
|
||||
|
|
Loading…
Add table
Reference in a new issue