Return only unique URLs
This commit is contained in:
parent
1a42894f3e
commit
4e4ec57324
@ -87,12 +87,12 @@
|
||||
]),
|
||||
|
||||
collectLocations : function(aFrame, aLocations) {
|
||||
aLocations = aLocations || [];
|
||||
aLocations.push(this.getHashString(aFrame.location.href));
|
||||
aLocations = aLocations || {};
|
||||
aLocations[this.getHashString(aFrame.location.href)] = true;
|
||||
Array.forEach(aFrame.frames, function(aSubFrame) {
|
||||
this.collectLocations(aSubFrame, aLocations);
|
||||
}, this);
|
||||
return aLocations;
|
||||
return Object.keys(aLocations);
|
||||
},
|
||||
getHashString : function(aString) {
|
||||
let hasher = Cc['@mozilla.org/security/hash;1']
|
||||
|
Loading…
x
Reference in New Issue
Block a user