├── .DS_Store
├── LICENSE
├── README.md
├── releases
├── twitter_client_urls_0.5.safariextz
├── twitter_client_urls_1.1.chromeextension.crx
└── twitter_client_urls_1.1.safariextz
├── twitter_client_urls.chromeextension
├── manifest.json
├── twitter_client_urls.chromeextension.pem
└── twitter_urls_to_clients.js
└── twitter_client_urls.safariextension
├── .DS_Store
├── Info.plist
├── Settings.plist
├── twitter_urls_to_clients.js
└── updates.plist
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/twitter-urls-to-clients/5e4e785c93009520e9b4a93704eb9db58489f44d/.DS_Store
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012 Art.sy, Orta Therox & Contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | =======================
2 |
3 | 
4 |
5 | =======================
6 |
7 | Converts all Twitter.com urls to mac twitter app specific URLs, it currently only works with TweetBot as there's no way to do it in EchoFon and I'm not sure I can bring myself to install the official Twitter App at the moment. PRs are welcome for that though.
8 |
9 | ## Download:
10 | ### Version 1.1
11 | [Safari](https://github.com/orta/twitter-urls-to-clients/raw/master/releases/twitter_client_urls_1.1.safariextz)
12 |
13 | [Chrome](https://github.com/orta/twitter-urls-to-clients/raw/master/releases/twitter_client_urls_1.1.chromeextension.crx) - [Chrome Store](https://chrome.google.com/webstore/detail/twitter-urls-to-clients/ifjdjgbajegbcifahnhcbejcfognlomg)
14 |
--------------------------------------------------------------------------------
/releases/twitter_client_urls_0.5.safariextz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/twitter-urls-to-clients/5e4e785c93009520e9b4a93704eb9db58489f44d/releases/twitter_client_urls_0.5.safariextz
--------------------------------------------------------------------------------
/releases/twitter_client_urls_1.1.chromeextension.crx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/twitter-urls-to-clients/5e4e785c93009520e9b4a93704eb9db58489f44d/releases/twitter_client_urls_1.1.chromeextension.crx
--------------------------------------------------------------------------------
/releases/twitter_client_urls_1.1.safariextz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/twitter-urls-to-clients/5e4e785c93009520e9b4a93704eb9db58489f44d/releases/twitter_client_urls_1.1.safariextz
--------------------------------------------------------------------------------
/twitter_client_urls.chromeextension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 |
4 | "name": "Twitter URLs to Clients",
5 | "description": "Converts all Twitter.com urls to mac twitter app specific URLs.",
6 | "version": "1.0",
7 |
8 | "content_scripts" : [
9 | {
10 | "matches" : [ "*://*/*" ],
11 | "js" : [ "twitter_urls_to_clients.js" ]
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/twitter_client_urls.chromeextension/twitter_client_urls.chromeextension.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMu/l/qcvzxDufHLA
3 | 8gsXuaJ2k8fPBGxHcAphe+y4KcZJlLaXvshBH6kmevXZHc6wFgrVgDGGsMN8sUM9z
4 | YOE+IUdB7M8XfKsQ4dY5bXhDpXq32sLkrr+vEifSEFxQ+lNJt0kBQqqfQWBeM2UWY
5 | lTbx3pDXuo7beykH1NGumMxxTAgMBAAECgYEAvvYji0++LM2NSYHtWX+8snYhlma/
6 | 9hT6vVAtqCsPQ43ezWi9/MFFZS0A1npaPyVhgUGcqb0C+C3qi6VLTe6D0oPOJpXaO
7 | gs6czVRg/24hskpu6g9+QQaIDbOXuxd7s3pKjLahb61v/8mlKR2Eqd5KufsZz4I/j
8 | kym16/CGPM0wECQQD28oINAhxeMe9PD9b/Af6ghHZnqJw2KaE+BgEZqJ0el7yAd68
9 | /Uc+une52SkMWmvEWT2FlKCCCCSI3BjlbIf+JAkEA0zeu3wGhBOrjZDaR1kGH7aGS
10 | 1EC51nrODgPv/5iRBIuzBnr765AphKcoHhMLMdu6gS0F+RxgzlBXnlQtNqPJ+wJBA
11 | MxWjKBg78JNxXyBWeC28NA365YIogH7Xo3o//4QVLqcygDviBZ4BsaxrkE5X9wTp4
12 | xTcP74PjX7gtFPGCS9tCkCQDwDXUd10gdwqe1mZ+eFtRZ6yxpNzb+4IuXujnmEIug
13 | 0vUhBF2UmD/Xl/MsWxB6FfSeI4GKYgpT8VPjil/onbZMCQAXAkigPgBmli+53yAMK
14 | dn0IKtGH1dpSvRcF4Zd8OPp3aFFVYGrE+eCZPusk81A22pOBJq1E/mCTZL9/dedo/
15 | ew=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/twitter_client_urls.chromeextension/twitter_urls_to_clients.js:
--------------------------------------------------------------------------------
1 | // console.log(safari.extension.settings.client)
2 |
3 | settings = {
4 | "hostname_blacklist": ["twitter.com"]
5 | }
6 |
7 | function change_twitter_to_clients() {
8 | var anchors = document.getElementsByTagName("a");
9 | for (var i = 0; i < anchors.length; i++ ){
10 |
11 | var anchor = anchors[i]
12 | if(anchor.href){
13 |
14 | var href = anchor.href
15 | if(href.indexOf("://twitter") != -1){
16 |
17 | var components = href.split("/")
18 | if(components.length == 4){
19 | var username = components[3]
20 | anchor.href = "tweetbot:///user_profile/" + username
21 | }
22 |
23 | }
24 | }
25 | }
26 | }
27 |
28 | function hostnameIsNotBlacklisted(hostname) {
29 | return settings.hostname_blacklist.indexOf(hostname) == -1
30 | }
31 |
32 | // We want to support dynamically added content so on every document change
33 | // do a quick check of the URLs. This will also most likely kick it to action initially.
34 |
35 | var observer = new WebKitMutationObserver(function(mutations) {
36 | mutations.forEach(function(mutation) {
37 | change_twitter_to_clients()
38 | });
39 | });
40 |
41 | var hostname = new URL(document.URL).hostname
42 |
43 | if (hostnameIsNotBlacklisted(hostname)) {
44 | var config = { attributes: true, childList: true, characterData: true, subtree: true };
45 | observer.observe(document.body, config);
46 | change_twitter_to_clients()
47 | };
--------------------------------------------------------------------------------
/twitter_client_urls.safariextension/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orta/twitter-urls-to-clients/5e4e785c93009520e9b4a93704eb9db58489f44d/twitter_client_urls.safariextension/.DS_Store
--------------------------------------------------------------------------------
/twitter_client_urls.safariextension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Author
6 | orta therox
7 | Builder Version
8 | 9537.48.3
9 | CFBundleDisplayName
10 | Twitter Client URLs
11 | CFBundleIdentifier
12 | io.github.orta.twitterclienturls
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleShortVersionString
16 | 1.1
17 | CFBundleVersion
18 | 1.1
19 | Chrome
20 |
21 | Content
22 |
23 | Scripts
24 |
25 | End
26 |
27 | twitter_urls_to_clients.js
28 |
29 |
30 |
31 | Description
32 | Converts all Twitter.com urls to mac twitter app specific URLs
33 | ExtensionInfoDictionaryVersion
34 | 1.0
35 | Permissions
36 |
37 | Website Access
38 |
39 | Include Secure Pages
40 |
41 | Level
42 | All
43 |
44 |
45 | Update Manifest URL
46 | https://raw.github.com/orta/twitter-urls-to-clients/master/twitter_client_urls.safariextension/updates.plist
47 | Website
48 | https://github.com/orta/twitter-urls-to-clients
49 |
50 |
51 |
--------------------------------------------------------------------------------
/twitter_client_urls.safariextension/Settings.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Key
7 | client
8 | Title
9 | Mac Twitter Client
10 | Titles
11 |
12 | Tweetbot
13 | Twitter for Mac
14 | Echofon ( limited functionality )
15 |
16 | Type
17 | ListBox
18 | Values
19 |
20 | tweetbot
21 | twitter
22 | echofon
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/twitter_client_urls.safariextension/twitter_urls_to_clients.js:
--------------------------------------------------------------------------------
1 | // console.log(safari.extension.settings.client)
2 |
3 | settings = {
4 | "hostname_blacklist": ["twitter.com"]
5 | }
6 |
7 | function change_twitter_to_clients() {
8 | var anchors = document.getElementsByTagName("a");
9 | for (var i = 0; i < anchors.length; i++ ){
10 |
11 | var anchor = anchors[i]
12 | if(anchor.href){
13 |
14 | var href = anchor.href
15 | if(href.indexOf("://twitter") != -1){
16 |
17 | var components = href.split("/")
18 | if(components.length == 4){
19 | var username = components[3]
20 | anchor.href = "tweetbot:///user_profile/" + username
21 | }
22 |
23 | }
24 | }
25 | }
26 | }
27 |
28 | function hostnameIsNotBlacklisted(hostname) {
29 | return settings.hostname_blacklist.indexOf(hostname) == -1
30 | }
31 |
32 | // We want to support dynamically added content so on every document change
33 | // do a quick check of the URLs. This will also most likely kick it to action initially.
34 |
35 | var observer = new WebKitMutationObserver(function(mutations) {
36 | mutations.forEach(function(mutation) {
37 | change_twitter_to_clients()
38 | });
39 | });
40 |
41 | var hostname = new URL(document.URL).hostname
42 |
43 | if (hostnameIsNotBlacklisted(hostname)) {
44 | var config = { attributes: true, childList: true, characterData: true, subtree: true };
45 | observer.observe(document.body, config);
46 | change_twitter_to_clients()
47 | };
--------------------------------------------------------------------------------
/twitter_client_urls.safariextension/updates.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Extension Updates
6 |
7 |
8 | CFBundleIdentifier
9 | io.github.orta.twitterclienturls
10 | Developer Identifier
11 | NETCV7NTVF
12 | CFBundleVersion
13 | 1.1
14 | CFBundleShortVersionString
15 | 1.1
16 | URL https://github.com/orta/twitter-urls-to-clients/raw/master/releases/twitter_client_urls_1.1.safariextz
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------