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
|
// @id iitc-plugin-compute-ap-stats@Hollow011
|
||||||
// @name IITC plugin: Compute AP statistics
|
// @name IITC plugin: Compute AP statistics
|
||||||
// @category Info
|
// @category Info
|
||||||
// @version 0.3.0.@@DATETIMEVERSION@@
|
// @version 0.3.1.@@DATETIMEVERSION@@
|
||||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||||
// @updateURL @@UPDATEURL@@
|
// @updateURL @@UPDATEURL@@
|
||||||
// @downloadURL @@DOWNLOADURL@@
|
// @downloadURL @@DOWNLOADURL@@
|
||||||
@ -30,11 +30,8 @@ window.plugin.compAPStats.setupCallback = function() {
|
|||||||
window.plugin.compAPStats.onPositionMove();
|
window.plugin.compAPStats.onPositionMove();
|
||||||
|
|
||||||
// make the value update when the map data updates
|
// make the value update when the map data updates
|
||||||
var handleDataResponseOrig = window.handleDataResponse;
|
window.addHook('mapDataRefreshEnd', window.plugin.compAPStats.onPositionMove);
|
||||||
window.handleDataResponse = function(data, textStatus, jqXHR) {
|
|
||||||
handleDataResponseOrig(data, textStatus, jqXHR);
|
|
||||||
window.plugin.compAPStats.onPositionMove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.plugin.compAPStats.onPositionMove = function() {
|
window.plugin.compAPStats.onPositionMove = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user