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:
Jon Atkins 2013-08-29 06:35:50 +01:00
parent 65d02edd16
commit c1b338d86b

View File

@ -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() {