+feedly
by
aetos382
2015-01-16 [2015/01/16 18:55:16]
現在見ているサイトのフィードを feedly cloud に登録するページを開く
@@ -29,5 +29,5 @@
}
else {
var u = 'http://cloud.feedly.com/#subscription' + encodeURIComponent('/feed/') + encodeURIComponent(h);
- $('<div style="margin: 0px;"><p><a href="' + u + '" target="_blank" style="display: inline-block; width: color: white; background-color: #2bb24c; font-size: 12px; border-radius: 3px; padding: 7px; 23px; font-family: sans-serif;">+feedly</a></p></div>').prependTo('body');
+ $('<div style="margin: 0px; padding: 0px;"><p><a href="' + u + '" target="_blank" style="display: inline-block; width: color: white; background-color: #2bb24c; font-size: 12px; border-radius: 3px; padding: 7px; 23px; font-family: sans-serif;">+feedly</a></p></div>').prependTo('body');
}
/*
* @title +feedly
* @description 現在見ているサイトのフィードを feedly cloud に登録するページを開く
* @include http://*
* @license MS-PL
* @require jQuery
*/
var h;
$('link[rel="alternate"]').each(function() {
var type = $(this).attr('type');
if (type.search(/(application|text)\/((atom|rds|rss)\+)?xml/i) != -1) {
h = $(this).attr('href');
if (h) {
var p = $('p');
p[0].insertAdjacentHTML('AfterBegin','<a href="' + h + '"/>');
h = p[0].firstChild.href;
return false;
}
}
});
if (!h) {
window.alert('Could not find feed');
}
else {
var u = 'http://cloud.feedly.com/#subscription' + encodeURIComponent('/feed/') + encodeURIComponent(h);
$('<div style="margin: 0px; padding: 0px;"><p><a href="' + u + '" target="_blank" style="display: inline-block; width: color: white; background-color: #2bb24c; font-size: 12px; border-radius: 3px; padding: 7px; 23px; font-family: sans-serif;">+feedly</a></p></div>').prependTo('body');
}
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。