svnno****@sourc*****
svnno****@sourc*****
2011年 1月 18日 (火) 10:34:48 JST
Revision: 1362 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1362 Author: anis774 Date: 2011-01-18 10:34:48 +0900 (Tue, 18 Jan 2011) Log Message: ----------- Ctrl + E でURLを開く際に、ポストを示すURLがユーザーページのURLとして開かれてしまうのを修正 Modified Paths: -------------- trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2011-01-17 16:46:41 UTC (rev 1361) +++ trunk/Tween/Tween.vb 2011-01-18 01:34:48 UTC (rev 1362) @@ -7134,12 +7134,14 @@ HashMgr.AddHashToHistory(hash.Trim, False) AddNewTabForSearch(hash) Exit Sub - ElseIf openUrlStr.StartsWith("http://twitter.com/") Then - Me.AddNewTabForUserTimeline(openUrlStr.Remove(0, "http://twitter.com/".Length)) + Else + Dim m As Match = Regex.Match(openUrlStr, "^https?://twitter.com/(#!/)?(?<name>[a-zA-Z0-9_]+)$") + If SettingDialog.OpenUserTimeline AndAlso m.Success AndAlso IsTwitterId(m.Result("${name}")) Then + Me.AddNewTabForUserTimeline(m.Result("${name}")) + Else + OpenUriAsync(openUrlStr) + End If Exit Sub - ElseIf openUrlStr.StartsWith("https://twitter.com/") Then - Me.AddNewTabForUserTimeline(openUrlStr.Remove(0, "https://twitter.com/".Length)) - Exit Sub End If openUrlStr = openUrlStr.Replace("://twitter.com/search?q=#", "://twitter.com/search?q=%23")