From 546ed4e98f61983db903a76051800815ed95cf47 Mon Sep 17 00:00:00 2001 From: fkloft Date: Wed, 13 Aug 2014 10:53:09 +0200 Subject: [PATCH] Avoid JS errors --- code/utils_misc.js | 2 +- mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/utils_misc.js b/code/utils_misc.js index 232613a3..ea6d6b9f 100644 --- a/code/utils_misc.js +++ b/code/utils_misc.js @@ -416,7 +416,7 @@ window.clampLatLngBounds = function(bounds) { // avoid error in stock JS if(goog && goog.style) { - goog.style.showElement = function(a, b) { + goog.style.setElementShown = goog.style.showElement = function(a, b) { if(a && a.style) a.style.display = b ? "" : "none" }; diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index 4b54fe96..d78d6895 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -370,7 +370,7 @@ public class IITC_Mobile extends Activity if (findViewById(R.id.imageLoading).getVisibility() == View.GONE) { // enough idle...let's do some work Log.d("resuming...reset idleTimer"); - mIitcWebView.loadUrl("javascript: window.idleReset();"); + mIitcWebView.loadJS("(function(){if(window.idleReset) window.idleReset();})();"); } }