Skip to content

Instantly share code, notes, and snippets.

@pmuellr
Created October 13, 2009 12:49
Show Gist options
  • Save pmuellr/209216 to your computer and use it in GitHub Desktop.
Save pmuellr/209216 to your computer and use it in GitHub Desktop.
Add a "Add to Google" button to Safari's RSS reader
<!-- ======================================================
Add a "Add to Google" (Reader or Homepage) icon to Safari's
RSS reader.
The file to edit is this one:
/System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/Resources/Feed.html
Make a copy before you continue. I suggest Feed-original.html
in the same directory.
Add the contents of this gist to the file, wherever you want.
I suggest in the Actions section, which you can find by
searching for the string /LOC.kActions/.
You may need to kill PubSubAgent from Activity Monitor
to get the change picked up. It manages the feed browser.
====================================================== -->
<!-- ========== add to google ========== -->
<? if feedCount == 1 then ?>
<div>
<a id="add-to-google">
<img src="http://gmodules.com/ig/images/plus_google.gif" border="0" alt="Add to Google">
</a>
</div>
<script>
try {
var url = "<?= aggregate:getUrl() ?>";
url = url.replace("feed:https://", "https://").replace("feed://", "http://");
var element = document.getElementById("add-to-google");
element.href = "http://fusion.google.com/add?feedurl=" + url;
}
catch (e) {}
</script>
<? end ?>
<!-- ========== add to google ========== -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment