Safari Extension

This commit is contained in:
Samuel Clay 2011-06-03 13:52:47 -04:00
parent 0e3d48b9b1
commit 83dc71175e
3 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Author</key>
<string>Samuel Clay</string>
<key>CFBundleDisplayName</key>
<string>NewsBlur Safari Extension</string>
<key>CFBundleIdentifier</key>
<string>com.newsblur.safari.rss</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Chrome</key>
<dict/>
<key>Content</key>
<dict>
<key>Scripts</key>
<dict>
<key>Start</key>
<array>
<string>content.js</string>
</array>
</dict>
</dict>
<key>Description</key>
<string>Add a site to NewsBlur by clicking on the RSS icon in the address bar.</string>
<key>ExtensionInfoDictionaryVersion</key>
<string>1.0</string>
<key>Permissions</key>
<dict>
<key>Website Access</key>
<dict>
<key>Level</key>
<string>All</string>
</dict>
</dict>
<key>Website</key>
<string>http://www.newsblur.com</string>
</dict>
</plist>

View file

@ -0,0 +1,5 @@
document.addEventListener("beforeload", function(e) {
if (/feed:\/\//.test(window.location.href)) {
window.location = "http://www.newsblur.com/?url=" + encodeURIComponent(window.location.href.replace('feed://', 'http://'));
}
}, true);