Quote:
Originally Posted by StefanM
... script which marks all occurrences of duplicates.
|
Code:
/*
disable dupes
trigger : toolbar button pressed
*/
if (name == "disable dupes") {
var original = [];
getAllCrawledLinks().forEach(function(link) {
var url = link.contentURL;
if(url){
if(original.indexOf(url) == -1){
original.push(url);
//link.comment = "original";
} else {
link.enabled = false;
//link.comment = "dupe"
}
}
})
}
Script also has an option to set comment which is disabled by default. If enabled, the comment on first link will be set as 'orginal' and subsequent links will be set to "dupes". This will be useful for creating view filters.