From 2472bc251d54a7cca31f6f6e722ff1000190546b Mon Sep 17 00:00:00 2001 From: mahanstreamer <84676642+mahanstreamer@users.noreply.github.com> Date: Thu, 28 Oct 2021 21:57:36 -0400 Subject: [PATCH 1/2] Update utils.ts --- src/shared/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 594c5bc9..4353623c 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -102,7 +102,9 @@ export const docsUrl = `${joinLemmyUrl}/docs/en/index.html`; export const helpGuideUrl = `${joinLemmyUrl}/docs/en/about/guide.html`; // TODO find a way to redirect to the non-en folder export const markdownHelpUrl = `${helpGuideUrl}#markdown-guide`; export const sortingHelpUrl = `${helpGuideUrl}#sorting`; -export const archiveUrl = "https://archive.is"; +export const archiveTodayUrl = "https://archive.today"; +export const ghostArchiveUrl = "https://ghostarchive.org"; +export const webArchiveUrl = "https://web.archive.org"; export const elementUrl = "https://element.io"; export const postRefetchSeconds: number = 60 * 1000; From 25bfa841341ba356d80ffb7507ed4e46d7cc2fa6 Mon Sep 17 00:00:00 2001 From: mahanstreamer <84676642+mahanstreamer@users.noreply.github.com> Date: Thu, 28 Oct 2021 21:58:49 -0400 Subject: [PATCH 2/2] Update post-form.tsx --- src/shared/components/post/post-form.tsx | 28 +++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/shared/components/post/post-form.tsx b/src/shared/components/post/post-form.tsx index 40e8e7bc..133af945 100644 --- a/src/shared/components/post/post-form.tsx +++ b/src/shared/components/post/post-form.tsx @@ -20,7 +20,7 @@ import { i18n } from "../../i18next"; import { PostFormParams } from "../../interfaces"; import { UserService, WebSocketService } from "../../services"; import { - archiveUrl, + archiveTodayUrl, authField, capitalizeFirstLetter, choicesConfig, @@ -29,6 +29,7 @@ import { debounce, fetchCommunities, getSiteMetadata, + ghostArchiveUrl, isBrowser, isImage, pictrsDeleteToast, @@ -36,6 +37,7 @@ import { toast, validTitle, validURL, + webArchiveUrl, wsClient, wsJsonToRes, wsSubscribe, @@ -211,15 +213,35 @@ export class PostForm extends Component { /> {this.state.postForm.url && validURL(this.state.postForm.url) && ( +
- {i18n.t("archive_link")} + archive.org {i18n.t("archive_link")} + + ghostarchive.org {i18n.t("archive_link")} + + + archive.today {i18n.t("archive_link")} + +
)} {this.state.imageLoading && } {isImage(this.state.postForm.url) && (