diff --git a/minimo/chrome/content/minimo.js b/minimo/chrome/content/minimo.js index d5d6bb1aff0..f8b11295658 100755 --- a/minimo/chrome/content/minimo.js +++ b/minimo/chrome/content/minimo.js @@ -705,8 +705,13 @@ function URLBarEntered() { try { + if (!gURLBar) + return; + var url = gURLBar.value; - + if (gURLBar.value == "" || gURLBar.value == null) + return; + var fixedUpURI = gURIFixup.createFixupURI(url, 2 /*fixup url*/ ); gGlobalHistory.markPageAsTyped(fixedUpURI); diff --git a/minimo/chrome/content/preferences/preferences.js b/minimo/chrome/content/preferences/preferences.js index 9032a7dc212..900195b5e0b 100644 --- a/minimo/chrome/content/preferences/preferences.js +++ b/minimo/chrome/content/preferences/preferences.js @@ -47,17 +47,42 @@ function writeProxyPref() function sanitizeAll() { + + // Cookies + try + { + var cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"] + .getService(Components.interfaces.nsICookieManager); + cookieMgr.removeAll() + } catch (e) { } + + + // Form Data + try + { + var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"] + .getService(Components.interfaces.nsIFormHistory); + formHistory.removeAllEntries(); + } catch (e) { } + // Cache - var classID = Components.classes["@mozilla.org/network/cache-service;1"]; - var cacheService = classID.getService(Components.interfaces.nsICacheService); - cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY); - cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK); + try + { + var classID = Components.classes["@mozilla.org/network/cache-service;1"]; + var cacheService = classID.getService(Components.interfaces.nsICacheService); + cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY); + cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK); + } catch (e) { } // Autocomplete - var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"] - .getService(Components.interfaces.nsIBrowserHistory); - globalHistory.removeAllPages(); + try + { + var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"] + .getService(Components.interfaces.nsIBrowserHistory); + globalHistory.removeAllPages(); + } catch (e) { } + // Session History try { var os = Components.classes["@mozilla.org/observer-service;1"]