[Pkg-mozext-commits] [greasemonkey] 12/41: Update sync.js
David Prévot
taffit at moszumanska.debian.org
Thu Apr 30 22:06:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 61f8f0c4015c6effe60b0e1b064d9c4852341d77
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date: Mon Mar 23 13:29:28 2015 +0100
Update sync.js
---
modules/sync.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/sync.js b/modules/sync.js
index c4133c8..91262b4 100644
--- a/modules/sync.js
+++ b/modules/sync.js
@@ -68,7 +68,7 @@ ScriptRecord.prototype = {
gWeave.Utils.deferGetSet(
ScriptRecord, 'cleartext',
['downloadURL', 'enabled', 'installed',
- 'userExcludes', 'userIncludes',
+ 'userExcludes', 'userMatches', 'userIncludes',
'values', 'valuesTooBig',
]);
@@ -105,6 +105,7 @@ ScriptStore.prototype = {
rs.install();
rs.script.enabled = aRecord.cleartext.enabled;
rs.script.userExcludes = aRecord.cleartext.userExcludes;
+ rs.script.userMatches = aRecord.cleartext.userMatches;
rs.script.userIncludes = aRecord.cleartext.userIncludes;
setScriptValuesFromSyncRecord(rs.script, aRecord);
}
@@ -126,6 +127,7 @@ ScriptStore.prototype = {
record.cleartext.enabled = script.enabled;
record.cleartext.installed = !script.needsUninstall;
record.cleartext.userExcludes = script.userExcludes;
+ record.cleartext.userMatches = script.userMatches;
record.cleartext.userIncludes = script.userIncludes;
if (GM_prefRoot.getValue('sync.values')) {
@@ -137,12 +139,6 @@ ScriptStore.prototype = {
var names = storage.listValues();
for (var i = 0, name = null; name = names[i]; i++) {
var val = storage.getValue(name);
- try {
- val = JSON.parse(val);
- } catch (e) {
- dump('JSON parse error? ' + uneval(e) + '\n');
- continue;
- }
record.cleartext.values[name] = val;
totalSize += name.length;
totalSize += val.length || 4; // 4 for number / bool (no length).
@@ -197,6 +193,7 @@ ScriptStore.prototype = {
} else {
script.enabled = aRecord.cleartext.enabled;
script.userExcludes = aRecord.cleartext.userExcludes;
+ script.userMatches = aRecord.cleartext.userMatches;
script.userIncludes = aRecord.cleartext.userIncludes;
setScriptValuesFromSyncRecord(script, aRecord);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list