From 223885c604fc46b3c00826153a20917f301785a4 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 03:18:55 +0000 Subject: [PATCH 1/9] bump version number --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 071eb7c7..4aa3c61e 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ // ==UserScript== // @id ingress-intel-total-conversion@jonatkins // @name IITC: Ingress intel map total conversion -// @version 0.16.0.@@DATETIMEVERSION@@ +// @version 0.16.1.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ From 851cde474548f3a44b318cb25617efc0cec23386 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 03:19:12 +0000 Subject: [PATCH 2/9] bugfix: field count wasn't displayed for portals --- code/portal_detail_display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 231e9716..b349775a 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -178,7 +178,7 @@ window.getPortalMiscDetails = function(guid,d) { : null; var sinceText = time ? ['since', time] : null; - var linkedFields = ['fields', d.portalV2.linkedFields ? d.portalV2.linkedFields.length : 0]; + var linkedFields = ['fields', getPortalFields(guid).length]; // collect and html-ify random data var randDetailsData = []; From b5d1cbbfdf301de733c2ee9463fb95259aa7859a Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 04:53:43 +0000 Subject: [PATCH 3/9] use 1ms setTimeout calls to send initial requests for game score and artifact details as part of the munge code cleanups, a safety check was added to the munge searches. if no munge sets can be found, an exception is thrown and no requests are sent. if these requests are posted as part of the regular IITC boot process, these exceptions cause IITC to fail to load. this is a quick and safe fix --- code/artifact.js | 3 ++- code/game_status.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/artifact.js b/code/artifact.js index 88676ab5..cd8b118d 100644 --- a/code/artifact.js +++ b/code/artifact.js @@ -20,7 +20,8 @@ window.artifact.setup = function() { addResumeFunction(artifact.idleResume); - artifact.requestData(); + // move the initial data request onto a very short timer. prevents thrown exceptions causing IITC boot failures + setTimeout (artifact.requestData, 1); artifact._layer = new L.LayerGroup(); addLayerGroup ('Artifacts (Jarvis shards)', artifact._layer, true); diff --git a/code/game_status.js b/code/game_status.js index 10fe8d2c..94d24a6f 100644 --- a/code/game_status.js +++ b/code/game_status.js @@ -6,7 +6,8 @@ window.updateGameScoreFailCount = 0; window.updateGameScore = function(data) { if(!data) { - window.postAjax('getGameScore', {}, window.updateGameScore); + // move the postAjax call onto a very short timer. this way, if it throws an exception, it won't prevent IITC booting + setTimeout (function() { window.postAjax('getGameScore', {}, window.updateGameScore); }, 1); return; } From 7d923ee64e3f938c4eab1e038ecf27c052b12f8f Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 06:08:39 +0000 Subject: [PATCH 4/9] add a debugger breakpoint in hook exception handling --- code/hooks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/code/hooks.js b/code/hooks.js index fb295655..b53e5a0f 100644 --- a/code/hooks.js +++ b/code/hooks.js @@ -75,6 +75,7 @@ window.runHooks = function(event, data) { } } catch(err) { console.error('error running hook '+event+', error: '+err); + debugger; } }); return !interupted; From eadc04471280622bd18844af787b5d5f3254f7f1 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 17:53:22 +0000 Subject: [PATCH 5/9] don't try and request portal detailed data for a 'null' guid! oops --- code/portal_detail_display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index b349775a..9c26ea59 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -5,7 +5,7 @@ window.renderPortalDetails = function(guid) { selectPortal(window.portals[guid] ? guid : null); - if (!portalDetail.isFresh(guid)) { + if (guid && !portalDetail.isFresh(guid)) { portalDetail.request(guid); } From 26d410d306ae16b84fdb26f2eb4ca686a979bd71 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 17:53:57 +0000 Subject: [PATCH 6/9] comment concerning issues with AP gain calculations - relevant to #671 --- code/portal_info.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/portal_info.js b/code/portal_info.js index 56c47c23..d8be6198 100644 --- a/code/portal_info.js +++ b/code/portal_info.js @@ -123,6 +123,9 @@ window.getAttackApGain = function(d) { }); var linkCount = d.portalV2.linkedEdges ? d.portalV2.linkedEdges.length : 0; + +//FIXME: portalV2.linkedFields was never a piece of data from the server - it was something faked in IITC +//with the portal guid, window.getPortalFields will return the count of linked fields - but no guid passed into here var fieldCount = d.portalV2.linkedFields ? d.portalV2.linkedFields.length : 0; var resoAp = resoCount * DESTROY_RESONATOR; From 41979cb107a708fa58909baa98cc5cf9ff79e31b Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 2 Dec 2013 17:54:49 +0000 Subject: [PATCH 7/9] remove automatic refresh when 'account not activated' message or similar is shown in the past this was a common temporary issue with the intel site, so was worth having as a case in the code however, this is now very rare, and the more likely reason is an account suspension/ban - and a refresh won't help here! --- main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4aa3c61e..b704b05e 100644 --- a/main.js +++ b/main.js @@ -39,8 +39,11 @@ if(!d) { // page doesn’t have a script tag with player information. if(document.getElementById('header_email')) { // however, we are logged in. - setTimeout('location.reload();', 3*1000); - throw("Page doesn't have player data, but you are logged in. Reloading in 3s."); + // it used to be regularly common to get temporary 'account not enabled' messages from the intel site. + // however, this is no longer common. more common is users getting account suspended/banned - and this + // currently shows the 'not enabled' message. so it's safer to not repeatedly reload in this case +// setTimeout('location.reload();', 3*1000); + throw("Page doesn't have player data, but you are logged in."); } // FIXME: handle nia takedown in progress throw("Couldn't retrieve player data. Are you logged in?"); From 6ffbc2e2dee2967ec3097b15648e59d09f30f9c4 Mon Sep 17 00:00:00 2001 From: fkloft Date: Mon, 2 Dec 2013 20:44:31 +0100 Subject: [PATCH 8/9] Website: Add icons for mobile/desktop --- website/assets/css/style.css | 14 ++++++++++++++ website/assets/img/glyphicons-devices-white.png | Bin 0 -> 848 bytes website/assets/img/glyphicons-devices.png | Bin 0 -> 238 bytes website/index.php | 4 ++-- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 website/assets/img/glyphicons-devices-white.png create mode 100644 website/assets/img/glyphicons-devices.png diff --git a/website/assets/css/style.css b/website/assets/css/style.css index 8c4cc1e0..d5a882e3 100644 --- a/website/assets/css/style.css +++ b/website/assets/css/style.css @@ -11,3 +11,17 @@ table tr.category_header { table .description { font-style: italic; } + +.icon-chevron-desktop, +.icon-chevron-mobile { + background-image: url("../img/glyphicons-devices.png"); + background-position: 0 0; +} +.nav-list > .active > a > .icon-chevron-desktop, +.nav-list > .active > a > .icon-chevron-mobile +{ + background-image: url("../img/glyphicons-devices-white.png"); +} +.icon-chevron-mobile { + background-position: 0 -14px; +} diff --git a/website/assets/img/glyphicons-devices-white.png b/website/assets/img/glyphicons-devices-white.png new file mode 100644 index 0000000000000000000000000000000000000000..0493b32959f65459e641189cf3c4edcdade68fbe GIT binary patch literal 848 zcmXAmU1-u_6vqE+5HVP{MFib;6Le7*b!9_oqmZ%YRS;w0yz(j`AqXjhqA>DmLt?m6 zL?Q&oZZ;4lL{U-aM{P_|r_RseoFDUJuHW`Q;OjZ(|D5MM&-;Fwl|P=GxG^CJ!sN`f zbdLY4{BB+u=Un>u_LU%9O3pr=mr)YEUhnMejD+*_^i-`@i#a86j=1>LXf#HnQK!?P z91e#U?eh_0cXyZ4ygC9GB}-YH>-#bT%> z=d|1Hz?fQFTjMF&hzoK)iAEF(MJN#K12{@8=pZ+`q_MwpSwrN5^Z-u(wNK6K*% literal 0 HcmV?d00001 diff --git a/website/assets/img/glyphicons-devices.png b/website/assets/img/glyphicons-devices.png new file mode 100644 index 0000000000000000000000000000000000000000..3f0df69bf6f8b21ff7bebbcaa7b99db59e93e1eb GIT binary patch literal 238 zcmVL9&@3ycs1yJn5e0U;Bu=3mXc_l6f0XxiuK zFe{;+od%$GYMH=RJwRI|xU^E-QDJ2X%DDKdvUfpYZ6jzp7%@8%lE+58fgb8XsTq30 zN* ' Home', 'news' => ' News', 'faq' => ' FAQ', - 'desktop' => ' Desktop', - 'mobile' => ' Mobile', + 'desktop' => ' Desktop', + 'mobile' => ' Mobile', 'test' => ' Test Builds', 'developer' => ' Developers', 'about' => ' About', From 39d1ea6b5b5bbf16da8163aaa902465253d6174e Mon Sep 17 00:00:00 2001 From: fkloft Date: Mon, 2 Dec 2013 20:58:56 +0100 Subject: [PATCH 9/9] Website: update mobile download and faq page - Android login is disabled now - issue #90 is closed - mention issue #257 --- website/page/faq.php | 17 ----------------- website/page/mobile.php | 9 ++++----- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/website/page/faq.php b/website/page/faq.php index 4374caa1..4d06b44a 100644 --- a/website/page/faq.php +++ b/website/page/faq.php @@ -2,23 +2,6 @@
    -
  • -

    Login on mobile doesn't work!

    -

    -Many users are seeing the error message Error: Server Error when attempting to log in on mobile. -To get past this and log in successfully, you can try to -

      -
    1. Exit IITC and try again. Some people have success after a number of tries, or
    2. -
    3. Cancel when asked to choose an account, and manually enter your email address and password into the web page
    4. -
    -

    -

    -As far as we can tell this isn't an IITC Mobile issue - using the Chrome browser on android, which also supports -Google login, can give similar issues. Further discussion on this is happening in -github issue #497. -

    -
  • -
  • I get a message saying my account isn't activated

    diff --git a/website/page/mobile.php b/website/page/mobile.php index 35198d6b..7093a8bd 100644 --- a/website/page/mobile.php +++ b/website/page/mobile.php @@ -24,12 +24,11 @@ install from the link below.

    Known issues

    -IITC Mobile is still in the early stages of development. Many things do not yet work right. Major known issues are: +IITC Mobile has some known problems, major issues are:

      -
    1. Some users get Error: Server Error when logging in. See the FAQ for possible workarounds.
    2. -
    3. Some plugins do not work well, or at all, at this time.
    4. -
    5. Serious issues exist on Android 4.0 devices. -details.
    6. +
    7. Some plugins do not work well, or at all.
    8. +
    9. Pinch zoom hangs on some devices. +details.