├── icon128.png ├── icon16.png ├── icon32.png ├── icon48.png ├── icon64.png ├── .github └── ISSUE_TEMPLATE │ ├── bug.md │ └── feature.md ├── background.js ├── manifest.json ├── content.js └── readme.md /icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/round/Twitter-Links-beta/HEAD/icon128.png -------------------------------------------------------------------------------- /icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/round/Twitter-Links-beta/HEAD/icon16.png -------------------------------------------------------------------------------- /icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/round/Twitter-Links-beta/HEAD/icon32.png -------------------------------------------------------------------------------- /icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/round/Twitter-Links-beta/HEAD/icon48.png -------------------------------------------------------------------------------- /icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/round/Twitter-Links-beta/HEAD/icon64.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: "⛔️bug" 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A description of what the bug is and what website it happens on. 12 | 13 | **Expected behavior** 14 | A clear and concise description of what you expected to happen. 15 | 16 | **Screenshots** 17 | If applicable, add screenshots or screen recordings to help explain. 18 | 19 | **Additional context** 20 | Add any other context about the problem. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: "❇️ feature" 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the solution you’d like** 11 | A description of what you feature or functionality you would like. 12 | 13 | **Is your feature request related to a problem? Please describe.** 14 | A clear and concise description of what the problem or bug is. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /background.js: -------------------------------------------------------------------------------- 1 | function openSearch(tab) { 2 | chrome.windows.getCurrent(function(currentWindow) { 3 | TwitterLinksPopup = window.open('http://twitter.com/search?q=' + tab.url.split('?')[0] + '&TwitterLinks', 'TwitterLinks-' + tab.id, 'top=' + (currentWindow.top + (currentWindow.height - tab.height)) + ', left=' + (currentWindow.left + tab.width - 400) + ', width=400, height=' + tab.height); 4 | }); 5 | } 6 | 7 | chrome.browserAction.onClicked.addListener(function(tab) { 8 | openSearch(tab) 9 | }); 10 | 11 | chrome.contextMenus.create({ 12 | title: "Twitter links to this page\u2026" 13 | }); 14 | 15 | chrome.contextMenus.onClicked.addListener(function(info, tab) { 16 | openSearch(tab) 17 | }); 18 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Twitter Links", 4 | "version": "0.7", 5 | "description": "Show the latest tweets that link to the current page.", 6 | "author": "Maxim Leyzerovich", 7 | "homepage_url": "https://twitter.com/round", 8 | "icons": { 9 | "16": "icon16.png", 10 | "32": "icon32.png", 11 | "48": "icon64.png", 12 | "64": "icon64.png", 13 | "128": "icon128.png" 14 | }, 15 | "browser_action": { 16 | "default_title": "Twitter links to this page\u2026" 17 | }, 18 | "permissions": [ 19 | "activeTab", 20 | "contextMenus" 21 | ], 22 | "background": { 23 | "scripts":["background.js"] 24 | }, 25 | "content_scripts": [{ 26 | "matches": ["*://twitter.com/*&TwitterLinks"], 27 | "js": ["content.js"] 28 | }] 29 | } 30 | -------------------------------------------------------------------------------- /content.js: -------------------------------------------------------------------------------- 1 | var style = document.createElement('style'); 2 | style.innerHTML = ` 3 | header[role="banner"], 4 | div[data-testid="primaryColumn"] > div:first-child > div:first-child > div:first-child { 5 | display: none !important; 6 | } 7 | 8 | div[role="tablist"] > div { 9 | display: none; 10 | } 11 | 12 | div[role="tablist"] > div:nth-child(1), 13 | div[role="tablist"] > div:nth-child(2) { 14 | display: block; 15 | width: 50%; 16 | } 17 | 18 | div[role="tablist"] > div a { 19 | padding-bottom: 15px; 20 | } 21 | 22 | div[aria-label="Previous"], 23 | div[aria-label="Next"] { 24 | display: none !important; 25 | } 26 | 27 | nav[role="navigation"] > div > div { 28 | width: 100%; 29 | } 30 | 31 | `; 32 | document.head.appendChild(style); 33 | 34 | // document.title = 'Loading Twitter Links\u2026'; 35 | 36 | var extensionTitle = 'Twitter links to this page:'; 37 | window.setInterval(function() { 38 | if (document.title !== extensionTitle) { 39 | document.title = extensionTitle; 40 | } 41 | }, 100); 42 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | #  ![Icon](https://raw.githubusercontent.com/round/Twitter-Links-beta/master/icon32.png) Twitter Links (Beta) 2 | 3 | 1. Download the [latest release ⬇️](https://github.com/round/Twitter-Links-beta/releases/latest). 4 | 2. Go to 'Extensions' in Chrome (`chrome://extensions`) or Edge (`edge://extensions`). 5 | 3. Enable 'Developer Mode' in the top right. 6 | 4. Click 'Load Unpacked' and select the unzipped extension folder. 7 | 8 | ![screenshot](https://camo.githubusercontent.com/edc65aa854e00ac2021a8bda200bc7b606a6ed14/68747470733a2f2f692e696d6775722e636f6d2f786463686451612e706e67) 9 | 10 | ## Feedback 11 | 12 | Please be sure to provide feedback by filing an issue to **[report a bug ⛔️](https://github.com/round/Twitter-Links-beta/issues/new?labels=⛔%EF%B8%8Fbug&template=bug.md)** or **[suggest a feature ❇️](https://github.com/round/Twitter-Links-beta/issues/new?labels=❇%EF%B8%8F%20feature&template=feature.md)** or send a **[message on Twitter 🐦](https://twitter.com/messages/compose?recipient_id=15300655&text=I%20have%20some%20feedback%20about%20Twitter%20Links%E2%80%A6 13 | )**. 14 | 15 | ## Planned Features 16 | 17 | * Button clicks to toggle popup window for each tab 18 | * Experimental: open results in native Chrome popover 19 | --------------------------------------------------------------------------------