@internetarchive/bookreader 5.0.0-53-alpha3 → 5.0.0-53-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,11 +128,11 @@
|
|
128
128
|
});
|
129
129
|
|
130
130
|
// analytics stub
|
131
|
-
window.archive_analytics = {
|
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
|
-
// event to know if user is
|
1286
|
-
this.trigger(BookReader.eventNames.userAction)
|
1285
|
+
// - specific event to know if user is reading book
|
1286
|
+
this.trigger(BookReader.eventNames.userAction)
|
1287
1287
|
this._components.navbar.updateNavIndexThrottled(index);
|
1288
1288
|
};
|
1289
1289
|
|
@@ -1544,8 +1544,7 @@ BookReader.prototype.bindNavigationHandlers = function() {
|
|
1544
1544
|
},
|
1545
1545
|
};
|
1546
1546
|
|
1547
|
-
// custom event for auto-loan-renew in ia-book-actions
|
1548
|
-
// - to know if user is actively reading
|
1547
|
+
// custom event for auto-loan-renew in ia-book-actions to know if user is active
|
1549
1548
|
this.$('nav.BRcontrols li button').on('click', () => {
|
1550
1549
|
this.trigger(BookReader.eventNames.userAction);
|
1551
1550
|
});
|