library: the walk position belongs to the origin, so the app beside the browser carries a reading on instead of listing the roll again
This commit is contained in:
@@ -893,13 +893,14 @@ step('and taking it reads the folder again', (await page.$$eval(thumbs, (els) =>
|
||||
// the roll again, every folder is listed a second time, and the counter starts
|
||||
// from zero while the frames it already holds are read again to be skipped.
|
||||
//
|
||||
// The position belongs to the tab now, so the reading carries on instead of
|
||||
// The position belongs to the origin now, so the reading carries on instead of
|
||||
// starting over. `check.hold` stops the reading on the frame it is reading, which
|
||||
// is where a reload lands — and the reading it left behind is still there when the
|
||||
// key goes, so the same reading finishes the roll. Everything is taken out of the
|
||||
// catalogue first, so the reading has frames on both sides of the reload.
|
||||
await page.evaluate(async () => {
|
||||
sessionStorage.clear();
|
||||
localStorage.removeItem('recipescam.library.walk.CheckRoll');
|
||||
localStorage.setItem('check.hold', '1');
|
||||
const db = await new Promise((resolve, reject) => {
|
||||
const req = indexedDB.open('recipescam-library');
|
||||
@@ -913,10 +914,10 @@ await page.evaluate(async () => {
|
||||
tx.onerror = () => reject(tx.error);
|
||||
});
|
||||
});
|
||||
// The position the tab is holding, the line the toolbar reads out, and the wait
|
||||
// The position the origin is holding, the line the toolbar reads out, and the wait
|
||||
// for it: the line is how far the reading has come, and it is the one thing on
|
||||
// screen that says whether a reading started over.
|
||||
const position = () => page.evaluate(() => JSON.parse(sessionStorage.getItem('recipescam.library.walk.CheckRoll') ?? 'null'));
|
||||
const position = () => page.evaluate(() => JSON.parse(localStorage.getItem('recipescam.library.walk.CheckRoll') ?? 'null'));
|
||||
const readout = () => page.$eval('[data-key="lib-progress"]', (e) => e.textContent ?? '').catch(() => '');
|
||||
const counting = () =>
|
||||
page.waitForFunction(
|
||||
|
||||
Reference in New Issue
Block a user