Skip to content

Instantly share code, notes, and snippets.

@Constellation
Created January 17, 2009 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Constellation/48298 to your computer and use it in GitHub Desktop.
Save Constellation/48298 to your computer and use it in GitHub Desktop.
tomblooに取り込まれてるかも.
そしたらひつようないです.
Tombloo.Service.extractors.register({
name: 'ReBlog - Dashboard iPhone',
ICON: 'chrome://tombloo/skin/reblog.ico',
check: function(ctx){
return (/(tumblr\.com)\/iphone/).test(ctx.href) && this.getLink(ctx);
},
extract : function(ctx){
return Tombloo.Service.extractors.ReBlog.extractByLink(ctx, this.getLink(ctx));
},
getLink : function(ctx){
var link = $x('./ancestor-or-self::li[starts-with(normalize-space(@id), "post")]//a[contains(concat(" ",normalize-space(@class)," ")," permalink ")]', ctx.target);
return link && link.href;
}
}, 'ReBlog');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment