1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-27 21:35:47 +01:00

Import fix from groups branch.

This commit is contained in:
Kris Maglione
2011-02-07 02:26:54 -05:00
parent 707af9e1fa
commit 9205867efd

View File

@@ -288,17 +288,17 @@ var Marks = Module("marks", {
function matchhost(url) !host || util.isDomainURL(url, host); function matchhost(url) !host || util.isDomainURL(url, host);
function match(marks) (k for ([k, v] in Iterator(marks)) if (timespan.contains(v.timestamp) && matchhost(v.location))); function match(marks) (k for ([k, v] in Iterator(marks)) if (timespan.contains(v.timestamp) && matchhost(v.location)));
for (let [url, local] in storage["local-marks"]) for (let [url, local] in marks._localMarks)
if (matchhost(url)) { if (matchhost(url)) {
for (let key in match(local)) for (let key in match(local))
delete local[key]; delete local[key];
if (!Object.keys(local).length) if (!Object.keys(local).length)
storage["local-marks"].remove(url); marks._localMarks.remove(url);
} }
storage["local-marks"].changed(); marks._localMarks.changed();
for (let key in match(storage["url-marks"])) for (let key in match(marks._urlMarks))
storage["url-marks"].remove(key); marks._urlMarks.remove(key);
} }
}); });
} }