diff --git a/code/botguard_interface.js b/code/botguard_interface.js index e986eeac..a1f11fc0 100644 --- a/code/botguard_interface.js +++ b/code/botguard_interface.js @@ -139,15 +139,15 @@ iitc_bg.get_method_group = function(method) { //NOTE: stock site has separate test for 'is any group' - IITC combines it into this one function that returns // undefined for no group - if (window.niantic_params.botguard_protected_methods.indexOf(method) != -1) { +// if (window.niantic_params.botguard_protected_methods.indexOf(method) != -1) { if (window.niantic_params.botguard_group_a_methods.indexOf(method) != -1) { return "group-a-actions"; } else { return "group-b-actions"; } - } - // method is not of any group - return undefined; +// } +// // method is not of any group +// return undefined; }; diff --git a/code/extract_niantic_parameters.js b/code/extract_niantic_parameters.js index 7a25f0ff..f8009369 100644 --- a/code/extract_niantic_parameters.js +++ b/code/extract_niantic_parameters.js @@ -73,7 +73,7 @@ window.extractFromStock = function() { // there are two. both contain a list of method names - one is the list of methods protected by either // botguard group-a or group-b, while the others is just a list of those in one group - window.niantic_params.botguard_protected_methods = []; +// window.niantic_params.botguard_protected_methods = []; window.niantic_params.botguard_group_a_methods = []; var countMethods = function(arr) { @@ -87,26 +87,25 @@ window.extractFromStock = function() { return count; } - var protectedMethodsCount = 0; +// var protectedMethodsCount = 0; var groupMethodsCount = 0; for (var i in arrays) { var arr = arrays[i]; var arrCount = countMethods(arr); - // now store the longest in niantic_params.botguard_protected_methods, and 2nd longest in .niantic_params.botguard_group_a_methods - - if (arrCount > protectedMethodsCount) { - // longest found - copy any existing longest to the 2nd longest - - window.niantic_params.botguard_group_a_methods = window.niantic_params.botguard_protected_methods; - groupMethodsCount = protectedMethodsCount; - - //... and set the longest - window.niantic_params.botguard_protected_methods = arr; - protectedMethodsCount = arrCount; - - } else if (arrCount > groupMethodsCount) { +// if (arrCount > protectedMethodsCount) { +// // longest found - copy any existing longest to the 2nd longest +// +// window.niantic_params.botguard_group_a_methods = window.niantic_params.botguard_protected_methods; +// groupMethodsCount = protectedMethodsCount; +// +// //... and set the longest +// window.niantic_params.botguard_protected_methods = arr; +// protectedMethodsCount = arrCount; +// +// } else + if (arrCount > groupMethodsCount) { // 2nd longest - store window.niantic_params.botguard_group_a_methods = arr; groupMethodsCount = arrCount; @@ -115,7 +114,7 @@ window.extractFromStock = function() { } - if (niantic_params.CURRENT_VERSION === undefined || window.niantic_params.botguard_protected_methods.length == 0) { + if (niantic_params.CURRENT_VERSION === undefined || window.niantic_params.botguard_group_a_methods.length == 0) { dialog({ title: 'IITC Broken', html: '
IITC failed to extract the required parameters from the intel site
'