@@ -12,14 +12,14 @@ BookReader.docCookies = docCookies;
1212 */
1313export class ResumePlugin extends BookReaderPlugin {
1414 options = {
15- enablePageResume : true ,
15+ enabled : true ,
1616 /** @type {string|null } eg '/', '/details/id' */
17- resumeCookiePath : null ,
17+ cookiePath : null ,
1818 }
1919
2020 /** @override */
2121 init ( ) {
22- if ( this . options . enablePageResume ) {
22+ if ( this . options . enabled ) {
2323 this . br . bind ( EVENTS . fragmentChange , ( ) => {
2424 const params = this . br . paramsFromCurrent ( ) ;
2525 this . updateResumeValue ( params . index ) ;
@@ -60,9 +60,9 @@ export class ResumePlugin extends BookReaderPlugin {
6060 */
6161 updateResumeValue ( index , cookieName ) {
6262 const ttl = new Date ( + new Date + 12096e5 ) ; // 2 weeks
63- // For multiple files in item, leave resumeCookiePath blank
64- // It's likely we can remove resumeCookiePath using getCookiePath()
65- const path = this . options . resumeCookiePath
63+ // For multiple files in item, leave cookiePath blank
64+ // It's likely we can remove cookiePath using getCookiePath()
65+ const path = this . options . cookiePath
6666 || this . getCookiePath ( window . location . pathname ) ;
6767 BookReader . docCookies . setItem ( cookieName || 'br-resume' , index , ttl , path , null , false ) ;
6868 }
0 commit comments