Last active
September 28, 2018 02:30
-
-
Save qiwihui/07a8bf3871ecbb6d1d95d9b7eef89f1a to your computer and use it in GitHub Desktop.
订阅 知乎专栏,简书和Medium
This file contains hidden or 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
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 == 'c') { | |
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; | |
// window.open(u, '_blank'); | |
} else { | |
return | |
} | |
})() |
Author
qiwihui
commented
Feb 6, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment