Created
December 6, 2010 12:30
-
-
Save tototoshi/730222 to your computer and use it in GitHub Desktop.
フィードを開く
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key.setViewKey('f', function() { | |
function collectFeedsURL() { | |
var doc = window._content.document; | |
var links = doc.getElementsByTagName('link'); | |
var urls = new Array(); | |
for (var i = 0; i < links.length; ++i) { | |
var type = links[i].getAttribute('type'); | |
if (type == "application/rss+xml" || type == "application/atom+xml") { | |
urls.push(links[i].href); | |
} | |
} | |
return urls; | |
} | |
var urls = collectFeedsURL(); | |
if (urls.length != 0) { | |
prompt.selector ( | |
{ | |
message : "Feeds", | |
collection: urls, | |
actions : [ | |
[function(i) { | |
window.open(urls[i]); | |
}, "Open Feeds"] | |
] | |
}); | |
} | |
}, 'Feed購読'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment