Last active
December 14, 2015 10:58
-
-
Save S64/5075375 to your computer and use it in GitHub Desktop.
b.twitter.greader: Twitter プロフィールページで使うと Google Reader のフィード購読ページに飛べるブックマークレット
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
(function(){ | |
var url = location.href; | |
var user = url.replace(/^https?:\/\/(mobile\.)?twitter\.com\/(#!\/)?(\w*)\/?.*$/,'$3'); | |
var rss = 'https://api.twitter.com/1/statuses/user_timeline.rss?screen_name='+user; | |
var reader; | |
var ua = navigator.userAgent; | |
if( ua.search(/(Android|iPhone|iPad|iPod)/) != -1 ) | |
reader = 'https://www.google.com/reader/i/#stream/feed/'; | |
else | |
reader = 'https://www.google.com/reader/view/feed/'; | |
window.open(reader+encodeURIComponent(rss)); | |
})(); |
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
javascript:(function(){var url=location.href;var user=url.replace(/^https?:\/\/(mobile\.)?twitter\.com\/(#!\/)?(\w*)\/?.*$/,'$3');var rss='https://api.twitter.com/1/statuses/user_timeline.rss?screen_name='+user;var reader;var ua=navigator.userAgent;if(ua.search(/(Android|iPhone|iPad|iPod)/)!=-1)reader='https://www.google.com/reader/i/#stream/feed/';else reader='https://www.google.com/reader/view/feed/';window.open(reader+encodeURIComponent(rss));})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Android 4.x の Stock Browser にて、アドレスバーから取ってこようとすると動きません。
Android 4.x の Chrome にて、「ブックマーク」から取ってこようとすると動きません。
どちらもブラウザの仕様によるものなので、対応は難しいですね。