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/chat.js b/code/chat.js index 31d7092d..2bcf5f79 100644 --- a/code/chat.js +++ b/code/chat.js @@ -106,7 +106,7 @@ window.chat.genPostData = function(isFaction, storageHash, getOlderMsgs) { // Currently this edge case is not handled. Let’s see if this is a // problem in crowded areas. $.extend(data, {minTimestampMs: min}); - // when requesting with an acutal minimum timestamp, request oldest rather than newest first. + // when requesting with an actual minimum timestamp, request oldest rather than newest first. // this matches the stock intel site, and ensures no gaps when continuing after an extended idle period if (min > -1) $.extend(data, {ascendingTimestampOrder: 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; } diff --git a/code/hooks.js b/code/hooks.js index fb295655..b4959745 100644 --- a/code/hooks.js +++ b/code/hooks.js @@ -66,18 +66,19 @@ window.runHooks = function(event, data) { if(VALID_HOOKS.indexOf(event) === -1) throw('Unknown event type: ' + event); if(!_hooks[event]) return true; - var interupted = false; + var interrupted = false; $.each(_hooks[event], function(ind, callback) { try { if (callback(data) === false) { - interupted = true; + interrupted = true; return false; //break from $.each } } catch(err) { console.error('error running hook '+event+', error: '+err); + debugger; } }); - return !interupted; + return !interrupted; } diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 231e9716..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); } @@ -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 = []; 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; diff --git a/main.js b/main.js index 071eb7c7..b704b05e 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@@ @@ -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?"); diff --git a/mobile/smartphone.css b/mobile/smartphone.css index bec0a5e8..be95476e 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -198,14 +198,14 @@ body { .linkdetails aside { padding: 5px; margin-top: 3px; - margin-botton: 3px; + margin-bottom: 3px; border: 2px outset #0e3d4e; } #toolbox > a { padding: 5px; margin-top: 3px; - margin-botton: 3px; + margin-bottom: 3px; border: 2px outset #0e3d4e; } 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 00000000..0493b329 Binary files /dev/null and b/website/assets/img/glyphicons-devices-white.png differ diff --git a/website/assets/img/glyphicons-devices.png b/website/assets/img/glyphicons-devices.png new file mode 100644 index 00000000..3f0df69b Binary files /dev/null and b/website/assets/img/glyphicons-devices.png differ diff --git a/website/index.php b/website/index.php index 43e61f2a..1902cc16 100644 --- a/website/index.php +++ b/website/index.php @@ -102,8 +102,8 @@ $pages = Array ( 'home' => ' Home', 'news' => ' News', 'faq' => ' FAQ', - 'desktop' => ' Desktop', - 'mobile' => ' Mobile', + 'desktop' => ' Desktop', + 'mobile' => ' Mobile', 'test' => ' Test Builds', 'developer' => ' Developers', 'about' => ' About', 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 @@
-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 -
-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. -
-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.
-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: