Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added FavouriteImage plugin #84

Open
wants to merge 151 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
577ee3d
Update workflow
mantikafasi Oct 10, 2023
2b25b01
add reviewdb
mantikafasi Oct 10, 2023
6211696
ci: Do not upload to builds repository as such does not exist
mugman174 Oct 10, 2023
0c22d84
Fix readme
mantikafasi Oct 10, 2023
793a43e
revert own profile deletion on client
mantikafasi Oct 11, 2023
e6a4caf
Add custom user agent to remove warning
mantikafasi Oct 11, 2023
49c81fc
Merge branch 'Vendicated:main' into main
mantikafasi Oct 12, 2023
b8c98b8
Add sync fork library
mantikafasi Oct 12, 2023
47ffdd6
Merge pull request #2 from Vendicated/main
github-actions[bot] Oct 13, 2023
9865663
Fix installation section in readme
h4rldev Oct 11, 2023
85da09b
try other merge methods
mantikafasi Oct 13, 2023
ae5136f
Merge branch 'main' of https://github.com/StupidityDB/VencordPlus
mantikafasi Oct 13, 2023
8593934
STOP SENDING ME EMAIL
mantikafasi Oct 13, 2023
e233b61
change merge method
mantikafasi Oct 19, 2023
f75e9a5
Merge pull request #11 from Vendicated/main
github-actions[bot] Oct 19, 2023
59cfd9c
Merge pull request #13 from Vendicated/main
github-actions[bot] Oct 21, 2023
5b9f59a
Merge pull request #14 from Vendicated/main
github-actions[bot] Oct 24, 2023
0e1f813
Merge pull request #15 from Vendicated/main
github-actions[bot] Oct 24, 2023
bfad110
fix webpack patching
Vendicated Oct 25, 2023
79dce0b
Fix components filter
Vendicated Oct 25, 2023
9c5a51f
fix: ComponentDispatch and GifPaste plugin (#1843)
MeguminSama Oct 25, 2023
9acedae
Fix CustomRPC (#1846)
Captain8771 Oct 25, 2023
1076514
fix: FavoriteGifSearch (#1842)
Syncxv Oct 25, 2023
6c1050a
fix: PictureInPicture (#1839)
lumap Oct 25, 2023
53ff6e8
noMosaic: fix (#1849)
AutumnVN Oct 25, 2023
770b8b9
noDevToolsWarning: fix (#1851)
AutumnVN Oct 25, 2023
1fa5907
callTimer: fix (#1850)
AutumnVN Oct 25, 2023
9b71c29
Fix NoTrack
Vendicated Oct 25, 2023
ca3e94b
SpotifyControls: Fix
Vendicated Oct 25, 2023
fe51f5c
usrbg: fix (#1853)
AutumnVN Oct 25, 2023
0f331d3
ContextMenuApi: fix
Vendicated Oct 25, 2023
d6df333
BadgeAPI: fix
Vendicated Oct 25, 2023
b3e60b1
MessageAccessoriesAPI: Fix
Vendicated Oct 25, 2023
0b61317
experiments: fix (#1855)
AutumnVN Oct 25, 2023
136c449
disableDMCallIdle: fix (#1856)
AutumnVN Oct 25, 2023
bd06a48
fix: notrack failing patches (#1857)
MeguminSama Oct 25, 2023
31b32f5
fix: fakeProfileThemes (#1837)
FieryFlames Oct 25, 2023
19319fa
ShowConnections, NoProfileThemes: Fix (#1854)
TheKodeToad Oct 25, 2023
542ed5d
MessageEvents: Fix
Vendicated Oct 25, 2023
ec26db5
ServerListAPI: fix
Vendicated Oct 25, 2023
b4a8bba
MemberListDecoratorAPI: Fix
Vendicated Oct 25, 2023
d00eb36
fix: CommandsAPI
redstonekasi Oct 25, 2023
4956545
Fix PlatformIndicators
Vendicated Oct 25, 2023
a8d4ce3
MessageDecorationsAPI: fix
Vendicated Oct 25, 2023
04ec2e3
fix userutils (#1861)
AutumnVN Oct 25, 2023
345d362
fix(vcDoubleClick): update for new discord build (#1862)
D3SOX Oct 25, 2023
68419a0
fix: pronoundb profile popout (#1860)
MeguminSama Oct 25, 2023
8054a1e
fix: sortFriendRequests patches (#1848)
MeguminSama Oct 25, 2023
871edb0
Delete RNNoise - Krisp is now on web, so this is obsolete
Vendicated Oct 25, 2023
e50c04b
Merge remote-tracking branch 'upstream/dev'
mantikafasi Oct 25, 2023
0f55b0f
Merge pull request #16 from Vendicated/main
github-actions[bot] Oct 25, 2023
0adf572
fix reviewdb
mantikafasi Oct 25, 2023
6aba04c
Merge branch 'main' of https://github.com/StupidityDB/VencordPlus
mantikafasi Oct 25, 2023
b237112
Merge pull request #17 from Vendicated/main
github-actions[bot] Oct 25, 2023
4bf044f
Use personal token instead of github created one
mantikafasi Oct 25, 2023
0752964
Merge pull request #18 from Vendicated/main
mantikafasi Oct 25, 2023
11f7e4d
Merge pull request #19 from Vendicated/main
mantikafasi Oct 26, 2023
9944ed8
Merge pull request #20 from Vendicated/main
mantikafasi Oct 26, 2023
dd63760
Merge pull request #21 from Vendicated/main
mantikafasi Oct 26, 2023
4b317d4
Merge pull request #22 from Vendicated/main
mantikafasi Oct 27, 2023
7e82af8
Merge pull request #23 from Vendicated/main
mantikafasi Oct 28, 2023
ccf3808
Merge pull request #24 from Vendicated/main
mantikafasi Oct 28, 2023
2489b7c
add relationshipDB (#25)
amyulating Oct 28, 2023
9ee460d
Merge pull request #26 from Vendicated/main
mantikafasi Oct 28, 2023
4aced81
Merge pull request #27 from Vendicated/main
mantikafasi Oct 28, 2023
0757299
Merge pull request #29 from Vendicated/main
mantikafasi Oct 31, 2023
5c99f9e
Merge pull request #30 from Vendicated/main
mantikafasi Nov 1, 2023
c003dd8
Move userplugins to plusplugins (#28)
lillithkt Nov 1, 2023
21bfbc3
add DND Bypass plugin
mantikafasi Nov 2, 2023
7c39e7b
Fix ReviewDB
mantikafasi Nov 2, 2023
43905f5
Merge pull request #31 from Vendicated/main
mantikafasi Nov 3, 2023
a807d97
Merge pull request #32 from Vendicated/main
mantikafasi Nov 5, 2023
582aede
[AlwaysSuperReact]
mantikafasi Nov 5, 2023
6c53de0
Merge pull request #33 from Vendicated/main
mantikafasi Nov 9, 2023
32b4c48
Merge pull request #34 from Vendicated/main
mantikafasi Nov 9, 2023
37e7c9b
Merge commit 'refs/pull/35/head' of https://github.com/StupidityDB/Ve…
mantikafasi Nov 24, 2023
51a4bbd
fix rdb badge redirects
mantikafasi Nov 24, 2023
b0a38d6
Merge branch 'Vendicated:main' into main
mantikafasi Nov 25, 2023
68fa1b2
Merge branch 'Vendicated:main' into main
mantikafasi Dec 8, 2023
ed22a66
Delete AlwaysSuperReact
vencordplus-a Dec 8, 2023
a500375
Merge pull request #37 from Vendicated/main
vencordplus-a Dec 9, 2023
26912f9
Fork Sync: Update from parent repository (#38)
vencordplus-a Dec 14, 2023
b1de867
Merge pull request #39 from Vendicated/main
vencordplus-a Dec 14, 2023
aa5e82c
Merge pull request #40 from Vendicated/main
vencordplus-a Dec 21, 2023
23c49a0
Merge pull request #41 from Vendicated/main
vencordplus-a Dec 22, 2023
21af889
Merge pull request #42 from Vendicated/main
vencordplus-a Dec 31, 2023
03822eb
Add TimezoneDB
mantikafasi Dec 31, 2023
eaafe7f
Merge branch 'main' of https://github.com/StupidityDB/VencordPlus
mantikafasi Dec 31, 2023
9add4ab
try to ignore README in pull requests
mantikafasi Dec 31, 2023
47285c8
Merge branch 'main' of https://github.com/Vendicated/Vencord into Ven…
mantikafasi Dec 31, 2023
7eb8ab2
Sync Upstream
mantikafasi Dec 31, 2023
b0a3b2d
Merge branch 'main' of https://github.com/Vendicated/Vencord
mantikafasi Jan 7, 2024
47ee39b
Merge branch 'Vendicated-main'
mantikafasi Jan 7, 2024
45a6840
Merge pull request #45 from Vendicated/main
vencordplus-a Jan 16, 2024
db1b48c
remove rdb as plus plugin since its part of original vencord now
mantikafasi Jan 16, 2024
8b7f265
Merge pull request #46 from Vendicated/main
vencordplus-a Jan 22, 2024
6b02626
Merge pull request #47 from Vendicated/main
vencordplus-a Jan 25, 2024
6e6772f
Merge pull request #48 from Vendicated/main
vencordplus-a Feb 4, 2024
f04bf49
Merge pull request #49 from Vendicated/main
vencordplus-a Feb 6, 2024
b5340ae
Merge pull request #50 from Vendicated/main
vencordplus-a Feb 7, 2024
a701462
Merge pull request #51 from Vendicated/main
vencordplus-a Feb 8, 2024
456daa3
Merge pull request #52 from Vendicated/main
vencordplus-a Feb 13, 2024
bddd3a7
Merge pull request #53 from Vendicated/main
vencordplus-a Feb 14, 2024
96ee4a8
fix timezonedb
mantikafasi Feb 14, 2024
ed36a9c
Merge pull request #54 from Vendicated/main
vencordplus-a Feb 16, 2024
b48da41
Merge pull request #55 from Vendicated/main
vencordplus-a Feb 27, 2024
1d3796c
Merge pull request #56 from Vendicated/main
vencordplus-a Mar 1, 2024
111b2fc
Merge pull request #57 from Vendicated/main
vencordplus-a Mar 8, 2024
bef8bf3
Merge pull request #58 from Vendicated/main
vencordplus-a Mar 8, 2024
b1949f1
Merge pull request #59 from Vendicated/main
vencordplus-a Mar 11, 2024
9656f2f
Merge pull request #60 from Vendicated/main
vencordplus-a Mar 22, 2024
896f419
Merge pull request #61 from Vendicated/main
vencordplus-a Mar 22, 2024
ece0312
Merge pull request #62 from Vendicated/main
vencordplus-a Mar 22, 2024
0941e68
fix build
mantikafasi Mar 23, 2024
488368f
Merge pull request #63 from Vendicated/main
vencordplus-a Mar 28, 2024
b912d40
Merge pull request #64 from Vendicated/main
vencordplus-a Mar 28, 2024
c828aa7
Merge pull request #65 from Vendicated/main
vencordplus-a Mar 28, 2024
889dc5c
Merge pull request #66 from Vendicated/main
vencordplus-a Mar 28, 2024
e462bdb
Merge pull request #67 from Vendicated/main
vencordplus-a Mar 28, 2024
dfa5c13
Merge pull request #68 from Vendicated/main
vencordplus-a Mar 29, 2024
3d95d37
fix dndbypass popout
mantikafasi Apr 4, 2024
c455929
delete relationshipdb its dead anyway
mantikafasi Apr 4, 2024
760ccd5
remove unneccesary print in timezones
mantikafasi Apr 4, 2024
92e3af8
better variable name in dndbypass
mantikafasi Apr 4, 2024
82e0d0f
Merge pull request #69 from Vendicated/main
vencordplus-a Apr 9, 2024
184f052
Merge pull request #70 from Vendicated/main
vencordplus-a Apr 14, 2024
e770ef1
Merge pull request #71 from Vendicated/main
vencordplus-a Apr 16, 2024
a40f46e
Merge pull request #72 from Vendicated/main
vencordplus-a Apr 17, 2024
fceda38
Merge pull request #73 from Vendicated/main
vencordplus-a Apr 17, 2024
f3a8045
Merge pull request #74 from Vendicated/main
vencordplus-a Apr 17, 2024
8201e26
Merge pull request #76 from Vendicated/main
vencordplus-a Apr 20, 2024
b23002d
Merge pull request #77 from Vendicated/main
vencordplus-a Apr 24, 2024
2eec890
Merge pull request #78 from Vendicated/main
vencordplus-a Apr 24, 2024
5a7a1e8
Merge pull request #79 from Vendicated/main
vencordplus-a Apr 27, 2024
4542015
added favouriteImage
veygax Apr 30, 2024
ef8cdb0
Update index.ts
veygax Apr 30, 2024
5b50254
Merge pull request #81 from Vendicated/main
vencordplus-a Apr 30, 2024
20074d7
Merge pull request #82 from Vendicated/main
vencordplus-a May 1, 2024
1258eda
Merge branch 'main' into main
veygax May 1, 2024
4f2ba66
Merge pull request #83 from Vendicated/main
vencordplus-a May 1, 2024
7b12c45
Merge branch 'main' into main
veygax May 2, 2024
15f53a7
fixed devs
veygax May 2, 2024
36fef11
Merge branch 'main' of https://github.com/veygax/VencordPlus
veygax May 4, 2024
f7f3c2f
moved plugin
veygax May 4, 2024
912bacc
tried to fix
veygax May 4, 2024
30bc511
Revert "tried to fix"
veygax May 4, 2024
efbbe12
fixed lint
veygax May 4, 2024
fa4b83f
Fork Sync: Update from parent repository (#85)
vencordplus-a May 5, 2024
cb1bc54
Merge pull request #86 from Vendicated/main
vencordplus-a May 5, 2024
7e1bdad
Merge pull request #87 from Vendicated/main
vencordplus-a May 5, 2024
8dd1c6a
Merge branch 'main' into main
veygax May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
README.md merge=ours
24 changes: 2 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- scripts/build/**
- package.json
- pnpm-lock.yaml
workflow_dispatch:

env:
FORCE_COLOR: true

Expand Down Expand Up @@ -50,31 +52,9 @@ jobs:
echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Upload DevBuild as release
if: github.repository == 'Vendicated/Vencord'
run: |
gh release upload devbuild --clobber dist/*
gh release edit devbuild --title "DevBuild $RELEASE_TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ env.release_tag }}

- name: Upload DevBuild to builds repo
if: github.repository == 'Vendicated/Vencord'
run: |
git config --global user.name "$USERNAME"
git config --global user.email [email protected]

git clone https://$USERNAME:[email protected]/$GH_REPO.git upload
cd upload

GLOBIGNORE=.git:.gitignore:README.md:LICENSE
rm -rf *
cp -r ../dist/* .

git add -A
git commit -m "Builds for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
git push --force https://$USERNAME:[email protected]/$GH_REPO.git
env:
API_TOKEN: ${{ secrets.BUILDS_TOKEN }}
GH_REPO: Vencord/builds
USERNAME: GitHub-Actions
20 changes: 20 additions & 0 deletions .github/workflows/sync_fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Sync Fork

on:
schedule:
- cron: '*/30 * * * *' # every 30 minutes
workflow_dispatch: # on button click

jobs:
sync:

runs-on: ubuntu-latest

steps:
- uses: tgymnich/[email protected]
with:
owner: StupidityDB
token: ${{ secrets.PERSONAL_TOKEN }}
ignore_fail: true
base: main
head: main
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lerna-debug.log*
.pnpm-debug.log*
*.tsbuildinfo

src/userplugins

ExtensionCache/
settings/

src/userplugins
34 changes: 4 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Vencord
# VencordPlus

[![Codeberg Mirror](https://img.shields.io/static/v1?style=for-the-badge&label=Codeberg%20Mirror&message=codeberg.org/Vee/cord&color=2185D0&logo=data:image/png;base64,iVBORw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qZSwzE+qpUpEQ9CC4qb01M8cRIQsh8zxiKsMtsn08nvlnrpkyAPj5AGJwMw3AtgGwJ/q2ExxvHsQB74KxfKBMblAyGmTHq4pc4/5GjQeUm6qE9FrAK4E8H6ie41GlkN/jTk6F5Ak2ueUpNmpkgfSMAAAENERAAsB3AHgZDoy0oFdFnBYpXPEBfU4beLRD6Z4qmumug+kIzPjaoeZfQDWAHgAQFam8hLh4MkwWjsHemyS2OF08IYrCjynzZ4zKTCzi5nXMvOnzBw16bevIxR95JOj7DNKb1PqXWa+HMDtAGoBXII0lxq0N2OfAmgA8Hsi2muMhudgesHPzNkA5gKoADADwFRoS8UHQO+x9wLoBNAB4AsAnwM4AOADIjLVxf8L9kdXUOE0IskAAAAASUVORK5CYII=)](https://codeberg.org/Vee/cord)
Fork of client mod Vencord with lots of extra plugins including ReviewDB

The cutest Discord client mod

| ![image](https://github.com/Vendicated/Vencord/assets/45497981/706722b1-32de-4d99-bee9-93993b504334) |
|:--:|
| A screenshot of vencord showcasing the [vencord-theme](https://github.com/synqat/vencord-theme) |
![image](https://github.com/Vendicated/Vencord/assets/45497981/706722b1-32de-4d99-bee9-93993b504334)

## Features

Expand All @@ -24,29 +20,7 @@ The cutest Discord client mod

## Installing / Uninstalling

Visit https://vencord.dev/download

## Join our Support/Community Server

https://discord.gg/D9uwnFnqmd

## Sponsors

| **Thanks a lot to all Vencord [sponsors](https://github.com/sponsors/Vendicated)!!** |
|:--:|
| [![](https://meow.vendicated.dev/sponsors.png)](https://github.com/sponsors/Vendicated) |
| *generated using [github-sponsor-graph](https://github.com/Vendicated/github-sponsor-graph)* |


## Star History

<a href="https://star-history.com/#Vendicated/Vencord&Timeline">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Vendicated/Vencord&type=Timeline&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Vendicated/Vencord&type=Timeline" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Vendicated/Vencord&type=Timeline" />
</picture>
</a>
[![Download and run the Installer](https://img.shields.io/github/v/release/StupidityDB/VencordPlusInstaller?label=Download%20Vencord%2B%20Installer&style=for-the-badge)](https://github.com/StupidityDB/VencordPlusInstaller#vencord-installer)

## Disclaimer

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const globPlugins = kind => ({
});

build.onLoad({ filter, namespace: "import-plugins" }, async () => {
const pluginDirs = ["plugins/_api", "plugins/_core", "plugins", "userplugins"];
const pluginDirs = ["plugins/_api", "plugins/_core", "plugins", "userplugins", "plusplugins"];
let code = "";
let plugins = "\n";
let i = 0;
Expand Down
122 changes: 122 additions & 0 deletions src/plusplugins/Timezones/Utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2023 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import * as DataStore from "@api/DataStore";
import { findStoreLazy } from "@webpack";
export const DATASTORE_KEY = "plugins.Timezones.savedTimezones";

import { debounce } from "@shared/debounce";
import { VENCORD_USER_AGENT } from "@shared/vencordUserAgent";

import { CustomTimezonePreference } from "./settings";

export interface TimezoneDB {
[userId: string]: string;
}

export const API_URL = "https://timezonedb.catvibers.me";
const Cache: Record<string, string> = {};

const UserSettingsProtoStore = findStoreLazy("UserSettingsProtoStore");

export function getTimeString(timezone: string, timestamp = new Date()): string {
try {
const locale = UserSettingsProtoStore.settings.localization.locale.value;
return new Intl.DateTimeFormat(locale, { hour: "numeric", minute: "numeric", timeZone: timezone }).format(timestamp); // we hate javascript
} catch (e) {
return "Error"; // incase it gets invalid timezone from api, probably not gonna happen but if it does this will prevent discord from crashing
}
}


// A map of ids and callbacks that should be triggered on fetch
const requestQueue: Record<string, ((timezone: string) => void)[]> = {};


async function bulkFetchTimezones(ids: string[]): Promise<TimezoneDB | undefined> {
try {
const req = await fetch(`${API_URL}/api/user/bulk`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-User-Agent": VENCORD_USER_AGENT
},
body: JSON.stringify(ids),
});

return await req.json()
.then((res: { [userId: string]: { timezoneId: string; } | null; }) => {
const tzs = (Object.keys(res).map(userId => {
return res[userId] && { [userId]: res[userId]!.timezoneId };
}).filter(Boolean) as TimezoneDB[]).reduce((acc, cur) => ({ ...acc, ...cur }), {});

Object.assign(Cache, tzs);
return tzs;
});
} catch (e) {
console.error("Timezone fetching failed: ", e);
}
}


// Executes all queued requests and calls their callbacks
const bulkFetch = debounce(async () => {
const ids = Object.keys(requestQueue);
const timezones = await bulkFetchTimezones(ids);
if (!timezones) {
// retry after 15 seconds
setTimeout(bulkFetch, 15000);
return;
}

for (const id of ids) {
// Call all callbacks for the id
requestQueue[id].forEach(c => c(timezones[id]));
delete requestQueue[id];
}
});

export function getUserTimezone(discordID: string, strategy: CustomTimezonePreference):
Promise<string | undefined> {

return new Promise(res => {
const timezone = (DataStore.get(DATASTORE_KEY) as Promise<TimezoneDB | undefined>).then(tzs => tzs?.[discordID]);
timezone.then(tz => {
if (strategy === CustomTimezonePreference.Always) {
if (tz) res(tz);
else res(undefined);
return;
}

if (tz && strategy === CustomTimezonePreference.Secondary)
res(tz);
else {
if (discordID in Cache) res(Cache[discordID]);
else if (discordID in requestQueue) requestQueue[discordID].push(res);
// If not already added, then add it and call the debounced function to make sure the request gets executed
else {
requestQueue[discordID] = [res];
bulkFetch();
}
}
});
});
}

const gist = "e321f856f98676505efb90aad82feff1";
const revision = "91034ee32eff93a7cb62d10702f6b1d01e0309e6";
const timezonesLink = `https://gist.githubusercontent.com/ArjixWasTaken/${gist}/raw/${revision}/timezones.json`;

export const getAllTimezones = async (): Promise<string[]> => {
if (typeof Intl !== "undefined" && "DateTimeFormat" in Intl) {
try {
const timeZoneOptions = Intl.DateTimeFormat().resolvedOptions();
return [timeZoneOptions.timeZone];
} catch { }
}

return await fetch(timezonesLink).then(tzs => tzs.json());
};
Loading
Loading