Rating: ' + data.imdbRating + '
Genre: ' + data.Genre + '
Starring: ' + data.Actors + '
';
+ if(data.picture) out += '

';
+ else out += '

';
+ if(data.from) out += '
'+data.name+'';
+ if(data.founded) out += 'Founded:
'+data.founded+'';
+ if(data.category) out += 'Category:
'+data.category+'';
+ if(data.website) out += 'Website:
'+data.website+'';
+ if(data.gender) out += 'Gender:
'+data.gender+'';
+ if(data.description) out += data.description + '
';
+ out += '
';
+ return out;
+ }
+ }),
+ */
+ new $.fn.oembed.OEmbedProvider("stackoverflow", "rich", ["stackoverflow.com/questions/[\\d]+"], "http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?"
+ , {templateRegex: /.*questions\/([\d]+).*/,
+ templateData: function (data) {
+ if (!data.questions)
+ return false;
+ var q = data.questions[0];
+ var body = $(q.body).text();
+ var out = '
'
+ + '
' + (q.up_vote_count - q.down_vote_count) + 'vote(s)
'
+ + '
' + q.answer_count + 'answer
' + q.view_count + ' view(s)
'
+ + '
'
+ + '
' + body.substring(0, 100) + '...
';
+ return out;
+ }
+ }),
+ new $.fn.oembed.OEmbedProvider("wordpress", "rich", ["wordpress\\.com/.+", "blogs\\.cnn\\.com/.+", "techcrunch\\.com/.+", "wp\\.me/.+"], "http://public-api.wordpress.com/oembed/1.0/?for=jquery-oembed-all"),
+ new $.fn.oembed.OEmbedProvider("screenr", "rich", ["screenr\.com"], "http://www.screenr.com/embed/$1",
+ {templateRegex: /.*\/([^\/]+).*/, embedtag: {tag: 'iframe', width: '650', height: 396}}) ,
+ new $.fn.oembed.OEmbedProvider("gigpans", "rich", ["gigapan\\.org/[-.\\w@]+/\\d+"], "http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html",
+ {templateRegex: /.*\/(\d+)\/?.*/, embedtag: {tag: 'iframe', width: '100%', height: 400 }}),
+ new $.fn.oembed.OEmbedProvider("scribd", "rich", ["scribd\\.com/.+"], "http://www.scribd.com/embeds/$1/content?start_page=1&view_mode=list",
+ {templateRegex: /.*doc\/([^\/]+).*/, embedtag: {tag: 'iframe', width: '100%', height: 600}}),
+ new $.fn.oembed.OEmbedProvider("kickstarter", "rich", ["kickstarter\\.com/projects/.+"], "$1/widget/card.html",
+ {templateRegex: /([^\?]+).*/, embedtag: {tag: 'iframe', width: '220', height: 380}}),
+ new $.fn.oembed.OEmbedProvider("amazon", "rich", ["amzn.com/B+", "amazon.com.*/(B\\S+)($|\\/.*)"], "http://rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr",
+ {
+ apikey: true,
+ templateRegex: /.*\/(B[0-9A-Z]+)($|\/.*)/,
+ embedtag: {
+ tag: 'iframe',
+ width: '120px',
+ height: '240px'}
+ }),
+ new $.fn.oembed.OEmbedProvider("slideshare", "rich", ["slideshare\.net"], "//www.slideshare.net/api/oembed/2", {format: 'jsonp'}),
+ new $.fn.oembed.OEmbedProvider("roomsharejp", "rich", ["roomshare\\.jp/(en/)?post/.*"], "http://roomshare.jp/oembed.json"),
+ new $.fn.oembed.OEmbedProvider("lanyard", "rich", ["lanyrd.com/\\d+/.+"], null,
+ {
+ yql: {
+ xpath: '(//div[@class="primary"])[1]',
+ from: 'htmlstring',
+ datareturn: function (results) {
+ if (!results.result)
+ return false;
+ return '
' + results.result + '
';
+ }
+ }
+ }),
+ new $.fn.oembed.OEmbedProvider("asciiartfarts", "rich", ["asciiartfarts.com/\\d+.html"], null,
+ {
+ yql: {
+ xpath: '//pre/font',
+ from: 'htmlstring',
+ datareturn: function (results) {
+ if (!results.result)
+ return false;
+ return '
' + results.result + '
';
+ }
+ }
+ }),
+ new $.fn.oembed.OEmbedProvider("coveritlive", "rich", ["coveritlive.com/"], null, {
+ templateRegex: /(.*)/,
+ template: 'Rating: ' + data.imdbRating + '
Genre: ' + data.Genre + '
Starring: ' + data.Actors + '
';
- if(data.picture) out += '

';
- else out += '

';
- if(data.from) out += '
' + data.name + '';
- if(data.founded) out += 'Founded:
' + data.founded + ''
- if(data.category) out += 'Category:
' + data.category + '';
- if(data.website) out += 'Website:
' + data.website + '';
- if(data.gender) out += 'Gender:
' + data.gender + '';
- if(data.description) out += data.description + '
';
- out += '
';
- return out;
- }
- }),
- new $.fn.oembed.OEmbedProvider("stackoverflow", "rich", ["stackoverflow.com/questions/[\\d]+"], "http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?", {
- templateRegex: /.*questions\/([\d]+).*/,
- templateData: function (data) {
- if(!data.questions) return false;
- var q = data.questions[0];
- var body = $(q.body).text();
- var out = '
' + '
' + (q.up_vote_count - q.down_vote_count) + 'vote(s)
' + '
' + q.answer_count + 'answer
' + q.view_count + ' view(s)
' + '
' + '
' + body.substring(0, 100) + '...
';
- return out;
- }
- }),
- new $.fn.oembed.OEmbedProvider("wordpress", "rich", ["wordpress\\.com/.+", "blogs\\.cnn\\.com/.+", "techcrunch\\.com/.+", "wp\\.me/.+"], "http://public-api.wordpress.com/oembed/1.0/?for=jquery-oembed-all"),
- new $.fn.oembed.OEmbedProvider("screenr", "rich", ["screenr\.com"], "http://www.screenr.com/embed/$1", {
- templateRegex: /.*\/([^\/]+).*/,
- embedtag: {
- tag: 'iframe',
- width: '650',
- height: 396
- }
- }),
- new $.fn.oembed.OEmbedProvider("gigpans", "rich", ["gigapan\\.org/[-.\\w@]+/\\d+"], "http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html", {
- templateRegex: /.*\/(\d+)\/?.*/,
- embedtag: {
- tag: 'iframe',
- width: '100%',
- height: 400
- }
- }),
- new $.fn.oembed.OEmbedProvider("scribd", "rich", ["scribd\\.com/.+"], "http://www.scribd.com/embeds/$1/content?start_page=1&view_mode=list", {
- templateRegex: /.*doc\/([^\/]+).*/,
- embedtag: {
- tag: 'iframe',
- width: '100%',
- height: 600
- }
- }),
- new $.fn.oembed.OEmbedProvider("kickstarter", "rich", ["kickstarter\\.com/projects/.+"], "$1/widget/card.html", {
- templateRegex: /([^\?]+).*/,
- embedtag: {
- tag: 'iframe',
- width: '220',
- height: 380
- }
- }),
- new $.fn.oembed.OEmbedProvider("amazon", "rich", ["amzn.com/B+", "amazon.com.*/(B\\S+)($|\\/.*)"], "http://rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr", {
- apikey: true,
- templateRegex: /.*\/(B[0-9A-Z]+)($|\/.*)/,
- embedtag: {
- tag: 'iframe',
- width: '120px',
- height: '240px'
- }
- }),
- new $.fn.oembed.OEmbedProvider("slideshare", "rich", ["slideshare\.net"], "http://www.slideshare.net/api/oembed/2", {
- format: 'jsonp'
- }),
- new $.fn.oembed.OEmbedProvider("roomsharejp", "rich", ["roomshare\\.jp/(en/)?post/.*"], "http://roomshare.jp/oembed.json"),
- new $.fn.oembed.OEmbedProvider("lanyard", "rich", ["lanyrd.com/\\d+/.+"], null, {
- yql: {
- xpath: '(//div[@class="primary"])[1]',
- from: 'htmlstring',
- datareturn: function (results) {
- if(!results.result) return false;
- return '
' + results.result + '
';
- }
- }
- }),
- new $.fn.oembed.OEmbedProvider("asciiartfarts", "rich", ["asciiartfarts.com/\\d+.html"], null, {
- yql: {
- xpath: '//pre/font',
- from: 'htmlstring',
- datareturn: function (results) {
- if(!results.result) return false;
- return '
' + results.result + '
';
- }
- }
- })
- ];
+ ];
})(jQuery);
+//This is needed for gravatar :(
+String.prototype.md5=function(){var a=function(a,b){var c=(a&65535)+(b&65535);var d=(a>>16)+(b>>16)+(c>>16);return d<<16|c&65535};var b=function(a,b){return a<