076914e5b7
- Split client, native, remote, serve, markdown, and SDK internals into focused packages with direct imports. - Move local and remote transport framing/protocol helpers behind clearer module boundaries. - Break up the extension injected DOM logic into a separate content dispatch bundle and dedicated content modules. - Add explicit client handling for passive remote discovery without noisy PQ warnings. - Keep behavior covered with updated unit, integration, and extension tests.
15 lines
447 B
TypeScript
15 lines
447 B
TypeScript
export function pageInfo() {
|
|
const metas: Record<string, string> = {};
|
|
document.querySelectorAll("meta[name], meta[property]").forEach(m => {
|
|
const k = m.getAttribute("name") || m.getAttribute("property");
|
|
if (k) metas[k] = m.getAttribute("content") || "";
|
|
});
|
|
return {
|
|
title: document.title,
|
|
url: location.href,
|
|
readyState: document.readyState,
|
|
lang: document.documentElement.lang || null,
|
|
meta: metas,
|
|
};
|
|
}
|