mirror of
https://github.com/txtdot/txtdot
synced 2024-10-18 14:40:19 +03:00
fix(plugins): text content output in searx, stackoverflow
This commit is contained in:
parent
9a6819e652
commit
dba42c64b4
@ -41,24 +41,17 @@ async function search(
|
||||
.textContent || '',
|
||||
};
|
||||
|
||||
return {
|
||||
html: <ResultItem {...parsed} />,
|
||||
text: `${parsed.title} (${parsed.url})\n${parsed.content}\n---\n\n`,
|
||||
};
|
||||
return <ResultItem {...parsed} />;
|
||||
});
|
||||
|
||||
const content = (
|
||||
<>
|
||||
{articles_parsed.map((a) => a.html)}
|
||||
{articles_parsed}
|
||||
<PageFooter page={page} previous={previous} next={next} />
|
||||
</>
|
||||
);
|
||||
|
||||
const textContent = articles_parsed.map((a) => a.text).join('');
|
||||
|
||||
return {
|
||||
content: content,
|
||||
textContent,
|
||||
title: `"${(document.getElementById('q') as HTMLInputElement).value}" - Searx - Page ${page}`,
|
||||
};
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ async function users(
|
||||
{topPosts}
|
||||
</>
|
||||
),
|
||||
textContent: `${ro.q.id}/${ro.q.slug}\n`, // TODO
|
||||
title: document.querySelector('title')?.textContent || '',
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export namespace JSX {
|
||||
export function createElement(
|
||||
name: any,
|
||||
props: { [id: string]: any },
|
||||
...inner: any[]
|
||||
...inner: (string | string[])[]
|
||||
) {
|
||||
const content = inner.flat().join('');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user