Mypal portable mode

This commit is contained in:
K4sum1 2025-03-24 16:06:08 -07:00
commit 633ef1c426
24 changed files with 299 additions and 25 deletions

View file

@ -16,7 +16,8 @@ Cu.import("resource://gre/modules/AsyncPrefs.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "WindowsUIUtils", "@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils");
XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-service;1", "nsIAlertsService");
XPCOMUtils.defineLazyServiceGetter(this, "winShellService",
"@mozilla.org/browser/shell-service;1","nsIWindowsShellService");
// lazy module getters
[
["AboutHome", "resource:///modules/AboutHome.jsm"],
@ -1029,6 +1030,8 @@ BrowserGlue.prototype = {
isDefaultError = true;
}
var profService = Cc["@mozilla.org/toolkit/profile-service;1"].getService(Ci.nsIToolkitProfileService);
if (profService.portable()!=1) {
if (isDefault) {
let now = (Math.floor(Date.now() / 1000)).toString();
Services.prefs.setCharPref("browser.shell.mostRecentDateSetAsDefault", now);
@ -1059,7 +1062,7 @@ BrowserGlue.prototype = {
DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
}
}
}}
E10SAccessibilityCheck.onWindowsRestored();
},