wepub

Check-in [05c6b57556]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Snap position as we leave a chapter, as otherwise our current reading position can be too far beyond what was last saved.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:05c6b575564a7661f4ed9a1571c491fcfb488ec932a54250585a36e5fe9af4b5
User & Date: vandys 2019-03-09 21:49:51
Context
2019-04-09
00:18
Center tap to get an actual modal, font change is in there now, along with explicit position sync and percentage document jump. Leaf check-in: e2ccaa73af user: vandys tags: master, trunk
2019-03-09
21:49
Snap position as we leave a chapter, as otherwise our current reading position can be too far beyond what was last saved. check-in: 05c6b57556 user: vandys tags: master, trunk
21:49
Serialize writing to state files, as I seem to get competing writes every now and then. check-in: 34f89ce2a5 user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to js/reader.js.

214
215
216
217
218
219
220












    });

    // Get any saved state.  This will scroll us to our last
    //  saved reading position.
    xhr_get("/state.json?doc=" + encodeURIComponent(docname),
        start_state);
}



















>
>
>
>
>
>
>
>
>
>
>
>
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
    });

    // Get any saved state.  This will scroll us to our last
    //  saved reading position.
    xhr_get("/state.json?doc=" + encodeURIComponent(docname),
        start_state);
}

// Hook for when they're about to advance to a new chapter.
//
// I didn't used to record, since I figured they'd get a bookmark
//  at the new chapter.  But I kept getting bit with the browser
//  not catching a lose-focus after a sequence of short-ish
//  chapters, and having to work through all of the chapters
//  again.
function end_chapter() {
    save_state();
    return true;
}