From c1b338d86b62f3a9f78212b647c8d75e52f1dcc5 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 29 Aug 2013 06:35:50 +0100 Subject: [PATCH] fix compute-ap-stats to use the hooks API, rather than a bad (and now broken) method of hooking into IITC --- plugins/compute-ap-stats.user.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/compute-ap-stats.user.js b/plugins/compute-ap-stats.user.js index ea9374f6..8aa3b975 100644 --- a/plugins/compute-ap-stats.user.js +++ b/plugins/compute-ap-stats.user.js @@ -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() {