Permalink
Browse files

Fix parent-link size issue

  • Loading branch information...
1 parent c3939d2 commit 3e9fd55b51988d21a64c43374e335f702f3e9f14 @harshjv committed Apr 12, 2017
Showing with 3 additions and 9 deletions.
  1. +3 −9 src/inject.js
View
@@ -131,19 +131,13 @@ const checkForRepoPage = () => {
getAPIData(getRepoContentURI(repoURI), (data) => {
const sizeArray = {}
- const upTree = document.querySelector('div.file-wrap > table > tbody > tr.up-tree > td > a.js-navigation-open')
-
- if (upTree) {
- upTree.parentNode.parentNode.appendChild(document.createElement('td'))
- }
-
for (const item of data) {
sizeArray[item.name] = item.type !== 'dir' ? item.size : null
}
- const list = document.querySelectorAll('table > tbody tr.js-navigation-item')
- const files = document.querySelectorAll('table > tbody tr.js-navigation-item td.content a')
- const ageForReference = document.querySelectorAll('table > tbody tr.js-navigation-item td:last-child')
+ const list = document.querySelectorAll('table > tbody tr.js-navigation-item:not(.up-tree)')
+ const files = document.querySelectorAll('table > tbody tr.js-navigation-item:not(.up-tree) td.content a')
+ const ageForReference = document.querySelectorAll('table > tbody tr.js-navigation-item:not(.up-tree) td:last-child')
let i = 0

0 comments on commit 3e9fd55

Please sign in to comment.