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 || '',
|
.textContent || '',
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return <ResultItem {...parsed} />;
|
||||||
html: <ResultItem {...parsed} />,
|
|
||||||
text: `${parsed.title} (${parsed.url})\n${parsed.content}\n---\n\n`,
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const content = (
|
const content = (
|
||||||
<>
|
<>
|
||||||
{articles_parsed.map((a) => a.html)}
|
{articles_parsed}
|
||||||
<PageFooter page={page} previous={previous} next={next} />
|
<PageFooter page={page} previous={previous} next={next} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const textContent = articles_parsed.map((a) => a.text).join('');
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: content,
|
content: content,
|
||||||
textContent,
|
|
||||||
title: `"${(document.getElementById('q') as HTMLInputElement).value}" - Searx - Page ${page}`,
|
title: `"${(document.getElementById('q') as HTMLInputElement).value}" - Searx - Page ${page}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ async function users(
|
|||||||
{topPosts}
|
{topPosts}
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
textContent: `${ro.q.id}/${ro.q.slug}\n`, // TODO
|
|
||||||
title: document.querySelector('title')?.textContent || '',
|
title: document.querySelector('title')?.textContent || '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ export namespace JSX {
|
|||||||
export function createElement(
|
export function createElement(
|
||||||
name: any,
|
name: any,
|
||||||
props: { [id: string]: any },
|
props: { [id: string]: any },
|
||||||
...inner: any[]
|
...inner: (string | string[])[]
|
||||||
) {
|
) {
|
||||||
const content = inner.flat().join('');
|
const content = inner.flat().join('');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user