update share board link

This commit is contained in:
plebeius.eth
2023-09-15 10:46:50 +02:00
parent 861902c35b
commit cb99446f4c
+11 -6
View File
@@ -1,14 +1,19 @@
function handleShareClick(selectedAddress, cid) {
const plebBzBaseURL = "https://pleb.bz/p/";
let shareLink;
let shareLink = `${plebBzBaseURL}${selectedAddress}/`;
if (cid === "rules" || cid === "description") {
shareLink = `https://plebchan.eth.limo/#/p/${selectedAddress}`;
} else {
const plebBzBaseURL = "https://pleb.bz/p/";
shareLink = `${plebBzBaseURL}${selectedAddress}/`;
if (cid !== "rules" && cid !== "description") {
shareLink += `c/${cid}`;
}
if (cid !== "rules" && cid !== "description") {
shareLink += `c/${cid}`;
shareLink += `?redirect=plebchan.eth.limo`;
}
shareLink += `?redirect=plebchan.eth.limo`;
if (navigator.clipboard) {
navigator.clipboard.writeText(shareLink).then(() => {
console.log("Link copied to clipboard!");