@internetarchive/bookreader 5.0.0-53-alpha2 → 5.0.0-53-alpha3
Sign up to get free protection for your applications and to get access to all the features.
@@ -128,11 +128,11 @@
|
|
128
128
|
});
|
129
129
|
|
130
130
|
// analytics stub
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
131
|
+
window.archive_analytics = {
|
132
|
+
send_event_no_sampling: (category, action, label) => console.log('~~~ NO SAMPLE EVENT CALLED: ', { category, action, label }),
|
133
|
+
send_event: (category, action, label) => console.log('~~~ send_event SAMPLE EVENT CALLED: ', { category, action, label }),
|
134
|
+
send_ping: (category, action, label) => console.log('~~~ send_ping SAMPLE EVENT CALLED: ', { category, action, label }),
|
135
|
+
}
|
136
136
|
</script>
|
137
137
|
|
138
138
|
<!-- IA fetch demo -->
|
package/package.json
CHANGED
package/src/BookReader/events.js
CHANGED
package/src/BookReader.js
CHANGED
@@ -1282,8 +1282,8 @@ BookReader.prototype.updateFirstIndex = function(
|
|
1282
1282
|
|
1283
1283
|
this.trigger(BookReader.eventNames.pageChanged);
|
1284
1284
|
|
1285
|
-
//
|
1286
|
-
this.trigger(BookReader.eventNames.userAction)
|
1285
|
+
// event to know if user is actively reading
|
1286
|
+
this.trigger(BookReader.eventNames.userAction);
|
1287
1287
|
this._components.navbar.updateNavIndexThrottled(index);
|
1288
1288
|
};
|
1289
1289
|
|
@@ -1544,7 +1544,8 @@ BookReader.prototype.bindNavigationHandlers = function() {
|
|
1544
1544
|
},
|
1545
1545
|
};
|
1546
1546
|
|
1547
|
-
// custom event for auto-loan-renew in ia-book-actions
|
1547
|
+
// custom event for auto-loan-renew in ia-book-actions
|
1548
|
+
// - to know if user is actively reading
|
1548
1549
|
this.$('nav.BRcontrols li button').on('click', () => {
|
1549
1550
|
this.trigger(BookReader.eventNames.userAction);
|
1550
1551
|
});
|