change censorship

This commit is contained in:
smolgrrr 2024-08-11 14:47:50 +10:00
parent 684bc9fdc2
commit c664a20681
6 changed files with 6 additions and 9 deletions

View File

@ -30,7 +30,6 @@ const QuoteEmbed = ({
<div className="flex flex-col break-words">
<ContentPreview key={event.id} eventdata={event} />
</div>
{renderMedia(files)}
<div className="flex justify-between items-center">
{metadataParsed ?
<img

View File

@ -85,7 +85,7 @@ const ContentPreview = ({ key, eventdata }: { key: string; eventdata: Event }) =
{isExpanded ? "...Read less" : "...Read more"}
</button>
)}
{url !== "" && <LinkModal key={key} url={url} />}
{/* {url !== "" && <LinkModal key={key} url={url} />} */}
{quoteEvents[0] && quoteEvents.length > 0 && (
<a href={`/thread/${nip19.noteEncode(quoteEvents[0].id)}`}>
<QuoteEmbed

View File

@ -42,7 +42,6 @@ const PostCard = ({
<div className={`flex flex-col break-words ${type !== "OP" ? 'hover:cursor-pointer' : ''}`} onClick={handleClick}>
<ContentPreview key={event.id} eventdata={event} />
</div>
{renderMedia(files)}
{repliedTo && <div className="flex items-center mt-1" >
<span className="text-xs text-gray-500">Reply to: </span>
{uniqBy(repliedTo, 'pubkey').map((event, index) => (

View File

@ -56,7 +56,6 @@ const RepostCard = ({
<div className={`flex flex-col break-words hover:cursor-pointer`} onClick={handleClick}>
<ContentPreview key={repostedEvent.id} eventdata={repostedEvent} />
</div>
{renderMedia(files)}
<div className={`flex justify-between items-center hover:cursor-pointer`} onClick={handleClick}>
{metadata ?
<img

View File

@ -7,12 +7,12 @@ function extractMediaUrls(content: string): string[] {
}
export function parseContent(event: Event) {
const files = extractMediaUrls(event.content);
const files: string[] = []; // extractMediaUrls(event.content);
let contentWithoutFiles = event.content;
files.forEach(file => {
contentWithoutFiles = contentWithoutFiles.replace(file, '');
});
// files.forEach(file => {
// contentWithoutFiles = contentWithoutFiles.replace(file, '');
// });
return {
comment: contentWithoutFiles.trim(),

View File

@ -11,7 +11,7 @@ type Subscribe = {
unsub?: boolean;
};
const blacklistUrl = ["lain.la", "casualcrypto.date", "files.catbox.moe", "i.ibb.co", "matrix"];
const blacklistUrl = ["lain.la", "casualcrypto.date", "files.catbox.moe", "i.ibb.co", "matrix", "dump.li", "files.v0l.io"];
const subList: Array<Subscription> = [];
const currentSubList: Array<Subscribe> = [];