✨ Adds Mullvad and IP blacklist check widgets
This commit is contained in:
@@ -46,6 +46,12 @@ export const timestampToDateTime = (timestamp) => {
|
||||
return `${timestampToDate(timestamp)} at ${timestampToTime(timestamp)}`;
|
||||
};
|
||||
|
||||
/* Given a 2-letter country ISO code, return the countries name */
|
||||
export const getCountryFromIso = (iso) => {
|
||||
const regionNames = new Intl.DisplayNames(['en'], { type: 'region' });
|
||||
return regionNames.of(iso);
|
||||
};
|
||||
|
||||
/* Given a 2-digit country code, return path to flag image from Flagpedia */
|
||||
export const getCountryFlag = (countryCode, dimens) => {
|
||||
const protocol = 'https';
|
||||
|
||||
@@ -209,6 +209,7 @@ module.exports = {
|
||||
widgetApiEndpoints: {
|
||||
anonAddy: 'https://app.anonaddy.com',
|
||||
astronomyPictureOfTheDay: 'https://apodapi.herokuapp.com/api',
|
||||
blacklistCheck: 'https://api.blacklistchecker.com/check',
|
||||
codeStats: 'https://codestats.net/',
|
||||
covidStats: 'https://disease.sh/v3/covid-19',
|
||||
cryptoPrices: 'https://api.coingecko.com/api/v3/coins/',
|
||||
@@ -223,6 +224,7 @@ module.exports = {
|
||||
holidays: 'https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForDateRange',
|
||||
jokes: 'https://v2.jokeapi.dev/joke/',
|
||||
news: 'https://api.currentsapi.services/v1/latest-news',
|
||||
mullvad: 'https://am.i.mullvad.net/json',
|
||||
publicIp: 'https://ipapi.co/json',
|
||||
publicIp2: 'https://api.ipgeolocation.io/ipgeo',
|
||||
publicIp3: 'http://ip-api.com/json',
|
||||
|
||||
Reference in New Issue
Block a user