mirror of
https://github.com/Zetaphor/browser-recall.git
synced 2025-12-06 10:29:38 +00:00
Start of redux
This commit is contained in:
@@ -3,12 +3,11 @@ console.log("Content script starting initialization...");
|
||||
function sendPageContent() {
|
||||
const pageContent = {
|
||||
url: window.location.href,
|
||||
html: document.documentElement.outerHTML,
|
||||
timestamp: new Date().toISOString().replace(/\.\d{3}Z$/, 'Z')
|
||||
};
|
||||
|
||||
browser.runtime.sendMessage({
|
||||
type: "SEND_PAGE_CONTENT",
|
||||
type: "SEND_PAGE_URL",
|
||||
data: pageContent
|
||||
});
|
||||
}
|
||||
@@ -19,10 +18,6 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
return Promise.resolve({ status: "ready" });
|
||||
}
|
||||
|
||||
if (message.type === "GET_PAGE_CONTENT") {
|
||||
sendPageContent();
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user