forked from lilydjwg/morerssplz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rss2inoreader.js
30 lines (30 loc) · 1.05 KB
/
rss2inoreader.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
javascript: (
function () {
var u = 'https://www.inoreader.com/?add_feed=';
var l = location;
c = l.pathname.split('/')[1];
if (l.host == 'medium.com') {
u += l.protocol + '//' + l.host + '/feed/' + c;
} else if (l.host == 'zhuanlan.zhihu.com') {
u += l.protocol + '//' + l.host + '/' + c;
} else if (l.host == 'www.jianshu.com') {
cid = l.pathname.split('/')[2];
if (c == 'u') {
u += 'http://jianshu.milkythinking.com/feeds/users/' + cid;
} else if (c == 'u') {
u += 'http://jianshu.milkythinking.com/feeds/collections/' + cid;
} else if (c == 'nb') {
u += 'http://jianshu.milkythinking.com/feeds/notebooks/' + cid;
} else {
alert("not supported!");
return
}
} else {
u += l.protocol + '//' + l.host + '/feed';
}
if (confirm(u)) {
l.href = u;
} else {
return
}
})()