Skip to content

Instantly share code, notes, and snippets.

@juniorz
Created October 25, 2008 02:18
Show Gist options
  • Save juniorz/19671 to your computer and use it in GitHub Desktop.
Save juniorz/19671 to your computer and use it in GitHub Desktop.
CmdUtils.makeBookmarkletCommand({
name: "Google Reader",
homepage: "http://reinaldojunior.net/",
author: { name: "Reinaldo de Souza Jr", email: "eu@reinaldojunior.com"},
license: "GPL",
icon: "http://www.google.com.br/reader/ui/favicon.ico",
preview: "Inscreve o feed RSS dessa página no Google Reader",
/*
//Poderia utilizar isso para encontrar os FEEDs da pagina atual
preview: function( pblock ) {
validRSS = ['application/rss+xml', 'application/atom+xml'];
feeds = jQuery('link[rel=alternate][type]').filter(function(){
return jQuery.inArray($(this).attr('type'), valid_rss);
});
},
*/
description: "Inscreve o feed RSS dessa página no Google Reader",
url: "javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment