aboutsummaryrefslogtreecommitdiffstats
path: root/site
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-07-01 00:03:34 -0700
committerPinapelz <yukais@pinapelz.com>2025-07-01 00:03:34 -0700
commitfdbf92c95c5355136c38e958f6add37a8d242aa7 (patch)
tree02ee4293deeaf65d20edf850abb2b58acab8efe9 /site
parent89550dc39da5ccdb7e729c1dc2b68e5075980bd4 (diff)
adjust post link to use middleware site
Diffstat (limited to 'site')
-rw-r--r--site/src/components/NewsFeed.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/site/src/components/NewsFeed.tsx b/site/src/components/NewsFeed.tsx
index fe81148..62d4420 100644
--- a/site/src/components/NewsFeed.tsx
+++ b/site/src/components/NewsFeed.tsx
@@ -129,7 +129,8 @@ export const NewsFeed: React.FC<NewsFeedProps> = ({ newsItems }) => {
href={`#${newsId}`}
onClick={(e) => {
e.preventDefault();
- const url = `${window.location.origin}${window.location.pathname}#${newsId}`;
+ const pathname = window.location.pathname === '/' ? '/news' : window.location.pathname.replace(/^\/game/, '');
+ const url = `https://ac.moekyun.me${pathname}?post=${newsId}`;
navigator.clipboard.writeText(url);
alert("Copied Direct Link to Post (Older news are automatically culled after some time)");
}}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage