mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:07:58 +01:00
[PWPBM] DTRT WRT titlemodifiers.
This commit is contained in:
@@ -1432,8 +1432,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
win.setAttribute("titlemodifier_normal", value);
|
win.setAttribute("titlemodifier_normal", value);
|
||||||
win.setAttribute("titlemodifier_privatebrowsing", value + suffix);
|
win.setAttribute("titlemodifier_privatebrowsing", value + suffix);
|
||||||
|
|
||||||
if (services.privateBrowsing.privateBrowsingEnabled) {
|
if (storage.privateMode) {
|
||||||
updateTitle(oldValue + suffix, value + suffix);
|
updateTitle(oldValue + suffix, value + suffix);
|
||||||
|
win.setAttribute("titlemodifier", value + suffix);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,9 +246,14 @@ var Storage = Module("Storage", {
|
|||||||
if (params == null || !isObject(params))
|
if (params == null || !isObject(params))
|
||||||
throw Error("Invalid argument type");
|
throw Error("Invalid argument type");
|
||||||
|
|
||||||
|
if (!(key in this.keys) && this.privateMode && key in this.globalInstance.keys) {
|
||||||
|
let obj = this.globalInstance.keys[key];
|
||||||
|
this.keys[key] = obj.clone ? obj.clone(this) : obj;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(key in this.keys) || params.reload || this.alwaysReload[key]) {
|
if (!(key in this.keys) || params.reload || this.alwaysReload[key]) {
|
||||||
if (key in this && !(params.reload || this.alwaysReload[key]))
|
if (key in this && !(params.reload || this.alwaysReload[key]))
|
||||||
throw Error();
|
throw Error("WTF? Hm...");
|
||||||
let load = function () self._loadData(key, params.store, params.type || myObject);
|
let load = function () self._loadData(key, params.store, params.type || myObject);
|
||||||
|
|
||||||
this.keys[key] = new constructor(key, params.store, load, params);
|
this.keys[key] = new constructor(key, params.store, load, params);
|
||||||
|
|||||||
Reference in New Issue
Block a user