Add chat mode functionality to EmptySidePanel component

This commit is contained in:
n4ze3m
2024-02-03 00:33:31 +05:30
parent 28361c47e6
commit 84f4205b56
4 changed files with 65 additions and 12 deletions

View File

@@ -1,7 +1,12 @@
const _getHtml = () => {
const url = window.location.href
const html = document.documentElement.outerHTML
return { url, html }
const url = window.location.href
const html = Array.from(document.querySelectorAll("script")).reduce(
(acc, script) => {
return acc.replace(script.outerHTML, "")
},
document.documentElement.outerHTML
)
return { url, html }
}
export const getHtmlOfCurrentTab = async () => {