Skip to content

Commit

Permalink
Filters url-shortener and filehoster from domaincloud
Browse files Browse the repository at this point in the history
  • Loading branch information
lennart committed Jul 3, 2010
1 parent 5febcb1 commit 7f91c4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions rewrites.json
Expand Up @@ -18,6 +18,10 @@
"from" : "feed.atom",
"to" : "_list/atom/by-date-and-domain"
},
{
"from" : "images/*",
"to" : "images/*"
},
{
"from" : "/*",
"to" : "../../../:*"
Expand Down
5 changes: 4 additions & 1 deletion views/domains/map.js
Expand Up @@ -4,7 +4,10 @@ function(doc) {
var matches = rxp.exec(doc.url);
var domain = matches[2];
var parts = domain.split(".").reverse();
emit(parts[1]+"."+parts[0], 1);
var second_level_domain = parts[1]+"."+parts[0];
if(["bit.ly","imgur.com","yousendit.com","u.nu","tinyurl.com","j.mp","imageshack.com","yfrog.com","megaupload.com"].indexOf(second_level_domain) == -1) {
emit(second_level_domain, 1);
}
}
}

0 comments on commit 7f91c4c

Please sign in to comment.