mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-28 12:37:23 +02:00
fix build
This commit is contained in:
@@ -5,10 +5,10 @@ import { renderOpenGraphUrl } from "./common";
|
|||||||
// copied from https://github.com/SimonBrazell/privacy-redirect/blob/master/src/assets/javascripts/helpers/twitter.js
|
// copied from https://github.com/SimonBrazell/privacy-redirect/blob/master/src/assets/javascripts/helpers/twitter.js
|
||||||
export const TWITTER_DOMAINS = ["twitter.com", "www.twitter.com", "mobile.twitter.com", "pbs.twimg.com"];
|
export const TWITTER_DOMAINS = ["twitter.com", "www.twitter.com", "mobile.twitter.com", "pbs.twimg.com"];
|
||||||
|
|
||||||
export function renderTwitterUrl(match: URL) {
|
export function renderTwitterUrl(match: URL, isLineEnd: boolean) {
|
||||||
if (!TWITTER_DOMAINS.includes(match.hostname)) return null;
|
if (!TWITTER_DOMAINS.includes(match.hostname)) return null;
|
||||||
|
|
||||||
const { twitterRedirect } = appSettings.value;
|
const { twitterRedirect } = appSettings.value;
|
||||||
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect));
|
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect), isLineEnd);
|
||||||
else return renderOpenGraphUrl(match);
|
else return renderOpenGraphUrl(match, isLineEnd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user