Skip to content

Commit 2d69a89

Browse files
author
cpv123
committed
Emtpy input --> target GitHub account
1 parent 12de2d2 commit 2d69a89

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Omnibox extension to help you go straight to a GitHub repository.
99

1010
Activate the extension by typing "gh" followed by a space; you can then either
1111

12-
- Filter through your list of saved repositories
12+
- Filter through your list of saved repositories and go
13+
- Input the exact name of a repository and go
1314
- Hit space again to see the full list of saved repositories
14-
- Enter the exact name of a repository
15-
- Hit space and then enter to go to the target GitHub account itself
15+
- Hit enter to go to the target GitHub account itself
1616

1717
## How it's built
1818

javascript/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Omnibox extension to help you go straight to a GitHub repository.
99

1010
Activate the extension by typing "gh" followed by a space; you can then either
1111

12-
- Filter through your list of saved repositories
12+
- Filter through your list of saved repositories and go
13+
- Input the exact name of a repository and go
1314
- Hit space again to see the full list of saved repositories
14-
- Enter the exact name of a repository
15-
- Hit space and then enter to go to the target GitHub account itself
15+
- Hit enter to go to the target GitHub account itself

mint/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Omnibox extension to help you go straight to a GitHub repository.
99

1010
Activate the extension by typing "gh" followed by a space; you can then either
1111

12-
- Filter through your list of saved repositories
12+
- Filter through your list of saved repositories and go
13+
- Input the exact name of a repository and go
1314
- Hit space again to see the full list of saved repositories
14-
- Enter the exact name of a repository
15-
- Hit space and then enter to go to the target GitHub account itself
15+
- Hit enter to go to the target GitHub account itself

mint/js/background.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ chrome.omnibox.onInputChanged.addListener((text, suggest) => {
3838
return suggest(suggestions);
3939
});
4040

41-
chrome.omnibox.onInputEntered.addListener((text) =>
42-
chrome.tabs.update({ url: `${BASE_URL}/${storedGithubProfile}/${text}` })
43-
);
41+
chrome.omnibox.onInputEntered.addListener((text) => {
42+
let githubUrl = `${BASE_URL}/${storedGithubProfile}`;
43+
if (text) {
44+
githubUrl += `/${text}`;
45+
}
46+
chrome.tabs.update({ url: githubUrl })
47+
})

mint/manifest.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "GitHubGo",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A Github Chrome extension built with Mint",
55
"manifest_version": 2,
66
"omnibox": {
@@ -11,12 +11,14 @@
1111
},
1212
"background": {
1313
"persistent": false,
14-
"scripts": ["background.js"]
14+
"scripts": [
15+
"background.js"
16+
]
1517
},
1618
"browser_action": {
1719
"default_popup": "index.html"
1820
},
1921
"permissions": [
2022
"storage"
2123
]
22-
}
24+
}

0 commit comments

Comments
 (0)