first pass of fixes for 2014-05-23
still need to fix name changes in response for portal details
This commit is contained in:
parent
4cc3cbbfc5
commit
589fd83b93
16
code/chat.js
16
code/chat.js
@ -72,7 +72,7 @@ window.chat.genPostData = function(isFaction, storageHash, getOlderMsgs) {
|
|||||||
var ne = b.getNorthEast();
|
var ne = b.getNorthEast();
|
||||||
var sw = b.getSouthWest();
|
var sw = b.getSouthWest();
|
||||||
var data = {
|
var data = {
|
||||||
desiredNumItems: isFaction ? CHAT_FACTION_ITEMS : CHAT_PUBLIC_ITEMS ,
|
// desiredNumItems: isFaction ? CHAT_FACTION_ITEMS : CHAT_PUBLIC_ITEMS ,
|
||||||
minLatE6: Math.round(sw.lat*1E6),
|
minLatE6: Math.round(sw.lat*1E6),
|
||||||
minLngE6: Math.round(sw.lng*1E6),
|
minLngE6: Math.round(sw.lng*1E6),
|
||||||
maxLatE6: Math.round(ne.lat*1E6),
|
maxLatE6: Math.round(ne.lat*1E6),
|
||||||
@ -141,12 +141,12 @@ window.chat._faction = {data:{}, oldestTimestamp:-1, newestTimestamp:-1};
|
|||||||
window.chat.handleFaction = function(data, olderMsgs) {
|
window.chat.handleFaction = function(data, olderMsgs) {
|
||||||
chat._requestFactionRunning = false;
|
chat._requestFactionRunning = false;
|
||||||
|
|
||||||
if(!data || !data.result) {
|
if(!data || !data.success) {
|
||||||
window.failedRequestCount++;
|
window.failedRequestCount++;
|
||||||
return console.warn('faction chat error. Waiting for next auto-refresh.');
|
return console.warn('faction chat error. Waiting for next auto-refresh.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.result.length === 0) return;
|
if(data.success.length === 0) return;
|
||||||
|
|
||||||
var old = chat._faction.oldestTimestamp;
|
var old = chat._faction.oldestTimestamp;
|
||||||
chat.writeDataToHash(data, chat._faction, false, olderMsgs);
|
chat.writeDataToHash(data, chat._faction, false, olderMsgs);
|
||||||
@ -156,7 +156,7 @@ window.chat.handleFaction = function(data, olderMsgs) {
|
|||||||
|
|
||||||
window.chat.renderFaction(oldMsgsWereAdded);
|
window.chat.renderFaction(oldMsgsWereAdded);
|
||||||
|
|
||||||
if(data.result.length >= CHAT_FACTION_ITEMS) chat.needMoreMessages();
|
if(data.success.length >= CHAT_FACTION_ITEMS) chat.needMoreMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.chat.renderFaction = function(oldMsgsWereAdded) {
|
window.chat.renderFaction = function(oldMsgsWereAdded) {
|
||||||
@ -191,12 +191,12 @@ window.chat._public = {data:{}, oldestTimestamp:-1, newestTimestamp:-1};
|
|||||||
window.chat.handlePublic = function(data, olderMsgs) {
|
window.chat.handlePublic = function(data, olderMsgs) {
|
||||||
chat._requestPublicRunning = false;
|
chat._requestPublicRunning = false;
|
||||||
|
|
||||||
if(!data || !data.result) {
|
if(!data || !data.success) {
|
||||||
window.failedRequestCount++;
|
window.failedRequestCount++;
|
||||||
return console.warn('public chat error. Waiting for next auto-refresh.');
|
return console.warn('public chat error. Waiting for next auto-refresh.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.result.length === 0) return;
|
if(data.success.length === 0) return;
|
||||||
|
|
||||||
var old = chat._public.oldestTimestamp;
|
var old = chat._public.oldestTimestamp;
|
||||||
chat.writeDataToHash(data, chat._public, true, olderMsgs);
|
chat.writeDataToHash(data, chat._public, true, olderMsgs);
|
||||||
@ -210,7 +210,7 @@ window.chat.handlePublic = function(data, olderMsgs) {
|
|||||||
case 'full': window.chat.renderFull(oldMsgsWereAdded); break;
|
case 'full': window.chat.renderFull(oldMsgsWereAdded); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.result.length >= CHAT_PUBLIC_ITEMS) chat.needMoreMessages();
|
if(data.success.length >= CHAT_PUBLIC_ITEMS) chat.needMoreMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.chat.renderPublic = function(oldMsgsWereAdded) {
|
window.chat.renderPublic = function(oldMsgsWereAdded) {
|
||||||
@ -258,7 +258,7 @@ window.chat.nicknameClicked = function(event, nickname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, isOlderMsgs) {
|
window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, isOlderMsgs) {
|
||||||
$.each(newData.result, function(ind, json) {
|
$.each(newData.success, function(ind, json) {
|
||||||
// avoid duplicates
|
// avoid duplicates
|
||||||
if(json[0] in storageHash.data) return true;
|
if(json[0] in storageHash.data) return true;
|
||||||
|
|
||||||
|
@ -91,13 +91,14 @@ function extractMungeFromStock() {
|
|||||||
// the rest are trickier - we need to parse the functions of the stock site. these break very often
|
// the rest are trickier - we need to parse the functions of the stock site. these break very often
|
||||||
// on site updates
|
// on site updates
|
||||||
|
|
||||||
// regular expression - to match either x.abcdef123456wxyz or x["123456abcdefwxyz"] format for property access
|
// // regular expression - to match either x.abcdef123456wxyz or x["123456abcdefwxyz"] format for property access
|
||||||
var mungeRegExpProp = '(?:\\.([a-z][a-z0-9]{15})|\\["([0-9][a-z0-9]{15})"\\])';
|
// var mungeRegExpProp = '(?:\\.([a-z][a-z0-9]{15})|\\["([0-9][a-z0-9]{15})"\\])';
|
||||||
// and one to match members of object literal initialisation - {abcdef123456wxyz: or {"123456abcdefwxyz":
|
// // and one to match members of object literal initialisation - {abcdef123456wxyz: or {"123456abcdefwxyz":
|
||||||
var mungeRegExpLit = '(?:([a-z][a-z0-9]{15})|"([0-9][a-z0-9]{15})"):';
|
// var mungeRegExpLit = '(?:([a-z][a-z0-9]{15})|"([0-9][a-z0-9]{15})"):';
|
||||||
|
|
||||||
// some cases don't munge now?!?! odd!
|
// some cases don't munge now?!?! odd!
|
||||||
var mungeRegExpLitOrUnmunged = '(?:((?:[a-z][a-z0-9]{15})|message|latE6|lngE6|tab|guid)|"([0-9][a-z0-9]{15})"):';
|
var mungeRegExpProp = '(?:\\.([a-z][a-z0-9]{15}|[a-z][a-zA-Z0-9]*)|\\["([0-9][a-z0-9]{15})"\\])';
|
||||||
|
var mungeRegExpLit = '(?:((?:[a-z][a-z0-9]{15})|[a-z][a-zA-Z0-9]*)|"([0-9][a-z0-9]{15})"):';
|
||||||
|
|
||||||
// common parameters - method, version, version_parameter - currently found in the
|
// common parameters - method, version, version_parameter - currently found in the
|
||||||
// nemesis.dashboard.network.XhrController.prototype.doSendRequest_ function
|
// nemesis.dashboard.network.XhrController.prototype.doSendRequest_ function
|
||||||
@ -119,8 +120,7 @@ function extractMungeFromStock() {
|
|||||||
foundMunges.quadKeys = result[1] || result[2];
|
foundMunges.quadKeys = result[1] || result[2];
|
||||||
|
|
||||||
// GET_PAGINATED_PLEXTS
|
// GET_PAGINATED_PLEXTS
|
||||||
var reg = new RegExp('[a-z] = {'+mungeRegExpLit+'[a-z], '
|
var reg = new RegExp('[a-z] = {'+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.sw.lat\\(\\)\\), '
|
||||||
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.sw.lat\\(\\)\\), '
|
|
||||||
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.sw.lng\\(\\)\\), '
|
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.sw.lng\\(\\)\\), '
|
||||||
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.ne.lat\\(\\)\\), '
|
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.ne.lat\\(\\)\\), '
|
||||||
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.ne.lng\\(\\)\\), '
|
+mungeRegExpLit+'Math.round\\(1E6 \\* [a-z].bounds.ne.lng\\(\\)\\), '
|
||||||
@ -130,23 +130,23 @@ function extractMungeFromStock() {
|
|||||||
|
|
||||||
var result = reg.exec(nemesis.dashboard.network.PlextStore.prototype.getPlexts.toString());
|
var result = reg.exec(nemesis.dashboard.network.PlextStore.prototype.getPlexts.toString());
|
||||||
|
|
||||||
foundMunges.desiredNumItems = result[1] || result[2];
|
// foundMunges.desiredNumItems = result[1] || result[2];
|
||||||
|
|
||||||
foundMunges.minLatE6 = result[3] || result[4];
|
foundMunges.minLatE6 = result[1] || result[2];
|
||||||
foundMunges.minLngE6 = result[5] || result[6];
|
foundMunges.minLngE6 = result[3] || result[4];
|
||||||
foundMunges.maxLatE6 = result[7] || result[8];
|
foundMunges.maxLatE6 = result[5] || result[6];
|
||||||
foundMunges.maxLngE6 = result[9] || result[10];
|
foundMunges.maxLngE6 = result[7] || result[8];
|
||||||
foundMunges.minTimestampMs = result[11] || result[12];
|
foundMunges.minTimestampMs = result[9] || result[10];
|
||||||
foundMunges.maxTimestampMs = result[13] || result[14];
|
foundMunges.maxTimestampMs = result[11] || result[12];
|
||||||
foundMunges.chatTabGet = result[15] || result[16]; //guessed parameter name - only seen munged
|
foundMunges.chatTabGet = result[13] || result[14]; //guessed parameter name - only seen munged
|
||||||
foundMunges.ascendingTimestampOrder = result[17] || result[18];
|
foundMunges.ascendingTimestampOrder = result[15] || result[16];
|
||||||
|
|
||||||
// SEND_PLEXT
|
// SEND_PLEXT
|
||||||
var reg = new RegExp('SEND_PLEXT, nemesis.dashboard.network.XhrController.Priority.[A-Z]+, {'
|
var reg = new RegExp('SEND_PLEXT, nemesis.dashboard.network.XhrController.Priority.[A-Z]+, {'
|
||||||
+mungeRegExpLitOrUnmunged+'[a-z], '
|
+mungeRegExpLit+'[a-z], '
|
||||||
+mungeRegExpLitOrUnmunged+'[a-z], '
|
+mungeRegExpLit+'[a-z], '
|
||||||
+mungeRegExpLitOrUnmunged+'[a-z], '
|
+mungeRegExpLit+'[a-z], '
|
||||||
+mungeRegExpLitOrUnmunged+'[a-z]}');
|
+mungeRegExpLit+'[a-z]}');
|
||||||
var result = reg.exec(nemesis.dashboard.network.PlextStore.prototype.sendPlext.toString());
|
var result = reg.exec(nemesis.dashboard.network.PlextStore.prototype.sendPlext.toString());
|
||||||
|
|
||||||
foundMunges.messageSendPlext = result[1] || result[2];
|
foundMunges.messageSendPlext = result[1] || result[2];
|
||||||
@ -157,7 +157,7 @@ function extractMungeFromStock() {
|
|||||||
|
|
||||||
// GET_PORTAL_DETAILS
|
// GET_PORTAL_DETAILS
|
||||||
var reg = new RegExp('GET_PORTAL_DETAILS, nemesis.dashboard.network.XhrController.Priority.[A-Z]+, {'
|
var reg = new RegExp('GET_PORTAL_DETAILS, nemesis.dashboard.network.XhrController.Priority.[A-Z]+, {'
|
||||||
+mungeRegExpLitOrUnmunged+'a}');
|
+mungeRegExpLit+'a}');
|
||||||
var result = reg.exec(nemesis.dashboard.network.DataFetcher.prototype.getPortalDetails.toString());
|
var result = reg.exec(nemesis.dashboard.network.DataFetcher.prototype.getPortalDetails.toString());
|
||||||
foundMunges.guid = result[1] || result[2];
|
foundMunges.guid = result[1] || result[2];
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// @id iitc-plugin-guess-player-levels@breunigs
|
// @id iitc-plugin-guess-player-levels@breunigs
|
||||||
// @name IITC plugin: guess player level
|
// @name IITC plugin: guess player level
|
||||||
// @category Info
|
// @category Info
|
||||||
// @version 0.5.2.@@DATETIMEVERSION@@
|
// @version 0.5.3.@@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@@
|
||||||
@ -189,7 +189,7 @@ window.plugin.guessPlayerLevels.extractChatData = function(data) {
|
|||||||
attackData[nick][timestamp].push(portal);
|
attackData[nick][timestamp].push(portal);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.raw.result.forEach(function(msg) {
|
data.raw.success.forEach(function(msg) {
|
||||||
var plext = msg[2].plext;
|
var plext = msg[2].plext;
|
||||||
|
|
||||||
// search for "x deployed an Ly Resonator on z"
|
// search for "x deployed an Ly Resonator on z"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// @id iitc-plugin-player-tracker@breunigs
|
// @id iitc-plugin-player-tracker@breunigs
|
||||||
// @name IITC Plugin: Player tracker
|
// @name IITC Plugin: Player tracker
|
||||||
// @category Layer
|
// @category Layer
|
||||||
// @version 0.10.2.@@DATETIMEVERSION@@
|
// @version 0.10.3.@@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@@
|
||||||
@ -144,7 +144,7 @@ window.plugin.playerTracker.eventHasLatLng = function(ev, lat, lng) {
|
|||||||
|
|
||||||
window.plugin.playerTracker.processNewData = function(data) {
|
window.plugin.playerTracker.processNewData = function(data) {
|
||||||
var limit = plugin.playerTracker.getLimit();
|
var limit = plugin.playerTracker.getLimit();
|
||||||
$.each(data.raw.result, function(ind, json) {
|
$.each(data.raw.success, function(ind, json) {
|
||||||
// skip old data
|
// skip old data
|
||||||
if(json[1] < limit) return true;
|
if(json[1] < limit) return true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user