Skip to content

Instantly share code, notes, and snippets.

@saitamanodoruji
Created September 8, 2011 02:45
Show Gist options
  • Save saitamanodoruji/1202476 to your computer and use it in GitHub Desktop.
Save saitamanodoruji/1202476 to your computer and use it in GitHub Desktop.
Pleeq に投稿するための tombloo patch
(function() {
models.register({
name : 'Pleeq',
ICON : 'http://pleeq.com/favicon.ico',
check : function(ps) {
return (/photo/).test(ps.type);
},
post : function(ps) {
var url = 'http://pleeq.com/add_image/' + '?title=' + encodeURIComponent(ps.item) + '&url=' + encodeURIComponent(ps.pageUrl) + '&src=' + encodeURIComponent(ps.itemUrl);
var form = {
tags : (ps.tags && ps.tags.length)? joinText(ps.tags, ',') : '',
subm : '+++Pleeq+this+image+++',
};
return request(url, {sendContent : form});
},
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment