+feedly
by
aetos382
2015-01-16 [2015/01/16 18:55:16]
現在見ているサイトのフィードを feedly cloud に登録するページを開く
/*
* @title +feedly
* @description my bookmarklet
* @license MS-PL
* @require jQuery
* @private
*/
var d=document,h,p;
$('link[rel="alternate"]').each(function() {
var t=$(this).attr('type');
if(t.search(/application\/((atom|rds|rss)\+)?xml/i)==-1&&t.indexOf('text/xml')==-1){
h=$(this).attr('href');
if(h){
window.alert(h);
var a = $('<a/>', {'href':h});
h=a.attr('href');
window.alert(h);
return false;
}
}
});
if(!h){
window.alert('Could not find feed');
}else{
var u='http://cloud.feedly.com/#subscription'+encodeURIComponent('/feed/')+encodeURIComponent(h);window.open(u);
}
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。