Skip to content

Commit

Permalink
Minor tweaks in GM_ScriptStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
supahgreg committed Sep 24, 2012
1 parent 22fbde1 commit edc1cdd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions extension/modules/api/GM_ScriptStorage.js
Expand Up @@ -53,9 +53,9 @@ GM_ScriptStorage.prototype._prefChanged = function(aName) {
oldValue: "r",
newValue: "r"
},
"name": aName,
"oldValue": this._watchedPrefs[aName].currentValue,
"newValue": newValue
name: aName,
oldValue: this._watchedPrefs[aName].currentValue,
newValue: newValue
});
}
this._watchedPrefs[aName].currentValue = newValue;
Expand All @@ -82,8 +82,8 @@ GM_ScriptStorage.prototype.watchValue = function(aName, aListener) {
}
else {
this._watchedPrefs[aName] = {
"currentValue": this.getValue(aName),
"watchers": [watcher]
currentValue: this.getValue(aName),
watchers: [watcher]
};

// Start watching the pref
Expand All @@ -103,7 +103,7 @@ GM_ScriptStorage.prototype.unwatchValue = function(aName, aUUID) {
let watchers = this._watchedPrefs[aName].watchers;

// If given a UUID, only remove the specified watcher
if (aUUID) {
if ("string" === typeof aUUID) {
for (let i = 0, e = watchers.length; i < e; ++i) {
if (aUUID === watchers[i].uuid) {
watchers.splice(i, 1);
Expand Down

0 comments on commit edc1cdd

Please sign in to comment.