mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-10 21:00:17 +02:00
fix build
This commit is contained in:
parent
cc4247dc88
commit
c38c08df7e
@ -5,10 +5,10 @@ import { renderOpenGraphUrl } from "./common";
|
||||
// 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 function renderTwitterUrl(match: URL) {
|
||||
export function renderTwitterUrl(match: URL, isLineEnd: boolean) {
|
||||
if (!TWITTER_DOMAINS.includes(match.hostname)) return null;
|
||||
|
||||
const { twitterRedirect } = appSettings.value;
|
||||
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect));
|
||||
else return renderOpenGraphUrl(match);
|
||||
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect), isLineEnd);
|
||||
else return renderOpenGraphUrl(match, isLineEnd);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user