Skip to content

Commit eec60b6

Browse files
committed
fix(handlerUtil): update code as per GitHub UI changes
1 parent eabc0ab commit eec60b6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## **v5.0.1** - 14th Oct, 2020
8+
9+
- Update selector path logic as per GitHub UI changes
10+
711
## **v5.0.0** - 3rd Aug, 2020
812

913
- Support Firefox browser 🎉

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Enhanced GitHub",
33
"short_name": "Enhanced GitHub",
4-
"version": "5.0.0",
4+
"version": "5.0.1",
55
"manifest_version": 2,
66
"description": "Display repo size, size of each file, download link and option to copy file contents",
77
"homepage_url": "https://github.com/softvar/enhanced-github",

src/utils/handlersUtil.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ let handlersUtil = {
5151
);
5252

5353
let actualDataIndex = 0;
54+
let startIndex = 0;
5455

55-
for (var i = 0; i < containerItems.length; i++) {
56-
const commitElem = containerItems[i].querySelector('.commit-message');
56+
if (window.location.href && window.location.href.indexOf('tree/' + commonUtil.getBranch()) > -1) {
57+
startIndex = 1;
58+
}
59+
60+
for (var i = startIndex; i < containerItems.length; i++) {
61+
const commitElem = containerItems[i].querySelector('div:nth-of-type(3)');
5762

5863
if (commitElem) {
5964
containerItems[i].querySelector('div:nth-of-type(2)').classList.remove('col-md-2', 'mr-3');

0 commit comments

Comments
 (0)