Created
December 23, 2011 13:44
-
-
Save eagletmt/1514242 to your computer and use it in GitHub Desktop.
Tombloo extractor for Danbooru
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Tombloo.Service.extractors.register({ | |
name : 'Photo - Danbooru', | |
ICON : 'http://danbooru.donmai.us/favicon.ico', | |
URL : 'http://danbooru.donmai.us/', | |
check : function(ctx) { | |
const DANBOORU_LIKE_SITES = [ | |
'://danbooru.donmai.us/post/show/', | |
'://yande.re/post/show/', | |
'://konachan.com/post/show/', | |
]; | |
return DANBOORU_LIKE_SITES.some(function(p) { return ctx.href.indexOf(p) != -1; }); | |
}, | |
extract : function(ctx) { | |
return { | |
type: 'photo', | |
item: ctx.title, | |
itemUrl: $x('id("highres")/@href'), | |
}; | |
} | |
}, 'Photo', false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment