"Issues"
This commit is contained in:
parent
7cfc183c0a
commit
d3f065b01c
22
archivist.js
22
archivist.js
|
@ -282,8 +282,6 @@ async function collect({chrome_port:port, mode} = {}) {
|
|||
if ( State.Indexing.has(info.targetId) ) return;
|
||||
State.Indexing.add(info.targetId);
|
||||
|
||||
State.Index.set(info.url, info.title);
|
||||
|
||||
if ( ! sessionId ) {
|
||||
sessionId = await untilHas(Sessions, info.targetId);
|
||||
}
|
||||
|
@ -292,6 +290,9 @@ async function collect({chrome_port:port, mode} = {}) {
|
|||
await untilHas(Installations, sessionId);
|
||||
}
|
||||
|
||||
const {title:latestTitle} = Targets.get(sessionId);
|
||||
State.Index.set(info.url, latestTitle);
|
||||
|
||||
send("DOMSnapshot.enable", {}, sessionId);
|
||||
|
||||
await sleep(500);
|
||||
|
@ -396,16 +397,13 @@ async function collect({chrome_port:port, mode} = {}) {
|
|||
async function attachToTarget(targetInfo) {
|
||||
if ( dontInstall(targetInfo) ) return;
|
||||
const {url} = targetInfo;
|
||||
if ( !!url && url != "about:blank" && !url.startsWith('chrome') ) {
|
||||
|
||||
if ( targetInfo.type == 'page' ) {
|
||||
if ( ! targetInfo.attached ) {
|
||||
const {sessionId} = await send("Target.attachToTarget", {
|
||||
targetId: targetInfo.targetId,
|
||||
flatten: true
|
||||
});
|
||||
Sessions.set(targetInfo.targetId, sessionId);
|
||||
}
|
||||
if ( url && targetInfo.type == 'page' ) {
|
||||
if ( ! targetInfo.attached ) {
|
||||
const {sessionId} = await send("Target.attachToTarget", {
|
||||
targetId: targetInfo.targetId,
|
||||
flatten: true
|
||||
});
|
||||
Sessions.set(targetInfo.targetId, sessionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import {fileURLToPath} from 'url';
|
|||
|
||||
export const context = Context;
|
||||
|
||||
export const DEBUG = process.env.DEBUG_22120 || false;
|
||||
export const DEBUG = process.env.DEBUG_22120 || true;
|
||||
|
||||
export const CHECK_INTERVAL = 400;
|
||||
export const TEXT_NODE = 3;
|
||||
|
|
3
todo
3
todo
|
@ -1,5 +1,6 @@
|
|||
- ensure we are correctly indexing / saving the page title when the page title updates.
|
||||
- issues. Title still out of date. We are incorrectly connecting to newtab, etc.
|
||||
- issues. Title still out of date.
|
||||
- We need to reload on localhost 22120 if we open with that
|
||||
- ensure we are getting the page text to index once it is actually loaded (we should call again later, or add mutation observer and update on mutate)
|
||||
- add export and import of the FTS index
|
||||
- link up to search input and provide results page
|
||||
|
|
Loading…
Reference in New Issue