Skip to content

Commit 531c7ef

Browse files
committed
Fix bug branches cannot be shown
1 parent a7c5140 commit 531c7ef

File tree

10 files changed

+10
-7
lines changed

10 files changed

+10
-7
lines changed

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v2.0.20
2+
* Fix bug causing some branches not to show
3+
14
### v2.0.19
25
* Accommodate new GitHub layout
36
* Support multiprocess for Firefox

dist/chrome.crx

-11 Bytes
Binary file not shown.

dist/chrome.zip

-11 Bytes
Binary file not shown.

dist/firefox.xpi

-11 Bytes
Binary file not shown.

dist/opera.nex

-11 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "octotree",
3-
"version": "2.0.19",
3+
"version": "2.0.20",
44
"description": "Code tree for GitHub and GitLab",
55
"main": "inject.js",
66
"scripts": {

src/adapters/github.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ class GitHub extends Adapter {
152152
}
153153

154154
// Get branch by inspecting page, quite fragile so provide multiple fallbacks
155-
const GH_BRANCH_SEL_1 = '[aria-label="Switch branches or tags"] .css-truncate-target'
155+
const GH_BRANCH_SEL_1 = '[aria-label="Switch branches or tags"]'
156156
const GH_BRANCH_SEL_2 = '.repo-root a[data-branch]'
157157
const GH_BRANCH_SEL_3 = '.repository-sidebar a[aria-label="Code"]'
158158
const GH_BRANCH_SEL_4 = '.current-branch'
159159
const GH_BRANCH_SEL_5 = 'link[title*="Recent Commits to"]'
160160

161161
const branch =
162162
// Detect branch in code page
163-
$(GH_BRANCH_SEL_1).text() || $(GH_BRANCH_SEL_2).data('branch') ||
163+
$(GH_BRANCH_SEL_1).attr('title') || $(GH_BRANCH_SEL_2).data('branch') ||
164164
// Non-code page (old GH design)
165165
($(GH_BRANCH_SEL_3).attr('href') || ' ').match(/([^\/]+)/g)[3] ||
166166
// Non-code page: commit page

src/config/chrome/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Octotree",
3-
"version": "2.0.19",
3+
"version": "2.0.20",
44
"manifest_version": 2,
55
"author": "Buu Nguyen",
66
"description": "Code tree for GitHub and GitLab",

src/config/firefox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"icon": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon48.png",
1010
"icon64": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon64.png",
1111
"license": "MIT",
12-
"version": "2.0.19",
12+
"version": "2.0.20",
1313
"permissions": {
1414
"cross-domain-content": [
1515
"https://api.github.com",

src/config/safari/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>2.0.19</string>
16+
<string>2.0.20</string>
1717
<key>CFBundleVersion</key>
18-
<string>2.0.19</string>
18+
<string>2.0.20</string>
1919
<key>Chrome</key>
2020
<dict/>
2121
<key>Content</key>

0 commit comments

Comments
 (0)