Skip to content

Instantly share code, notes, and snippets.

@sillygwailo
Created December 1, 2011 21:15
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 sillygwailo/1419934 to your computer and use it in GitHub Desktop.
Save sillygwailo/1419934 to your computer and use it in GitHub Desktop.
Embed Goodreads Widget in RSS Hero Has No Unread Items to Show
/*
Not-yet-working Safari extension to embed GoodReads widget into RSS Hero, an
emerging feed reader.
Immediate goal:
* When no items to read, embed my "currently-reading" (or could be 'to-read')
library to remind me which books I'm reading
Longer-term goal:
* When no items to read, embed a dashboard reminding me what there's left to do,
be it paid work or whatever the word is for work we do that isn't paid but is
a task that we either want or need to do
Installation (using the Extension Builder until I build it myself):
1. restrict "Extension Website Access" to some with the value of "*.rsshero.com"
2. set jquery.min.js from the jQuery library as one of the "Start Scripts"
3. set this script as one of the "End Scripts"
4. host the widget's HTML code somewhere
5. replace the placeholder text with the URL of the widget code below
6. visit RSS Hero (assuming you have an account) and read everything, then reload RSS Hero
References:
* http://ideas.justagwailo.com/greasemonkey/timetoread
* http://stackoverflow.com/questions/610995/jquery-cant-append-script-element
* http://www.goodreads.com/help/show/37-how-do-i-add-a-widget-to-my-blog
* http://www.rsshero.com/
*/
if (jQuery('#content #centered_message p').length == 1) {
jQuery('#content #centered_message p').replaceWith(
'<iframe class="twelve columns" style="height: 100%;" src="[URL to hosted widget code]"></iframe>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment