fix compute-ap-stats to use the hooks API, rather than a bad (and now broken) method of hooking into IITC
This commit is contained in:
parent
65d02edd16
commit
c1b338d86b
@ -2,7 +2,7 @@
|
||||
// @id iitc-plugin-compute-ap-stats@Hollow011
|
||||
// @name IITC plugin: Compute AP statistics
|
||||
// @category Info
|
||||
// @version 0.3.0.@@DATETIMEVERSION@@
|
||||
// @version 0.3.1.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
@ -30,11 +30,8 @@ window.plugin.compAPStats.setupCallback = function() {
|
||||
window.plugin.compAPStats.onPositionMove();
|
||||
|
||||
// make the value update when the map data updates
|
||||
var handleDataResponseOrig = window.handleDataResponse;
|
||||
window.handleDataResponse = function(data, textStatus, jqXHR) {
|
||||
handleDataResponseOrig(data, textStatus, jqXHR);
|
||||
window.plugin.compAPStats.onPositionMove();
|
||||
}
|
||||
window.addHook('mapDataRefreshEnd', window.plugin.compAPStats.onPositionMove);
|
||||
|
||||
}
|
||||
|
||||
window.plugin.compAPStats.onPositionMove = function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user