Skip to content

Commit

Permalink
Fixes org pages for github
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Apr 10, 2020
1 parent 96c6d1b commit 7b0a8cb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,14 @@ const getMemberListItemMetaData = (elem: Element): RewardsTip.MediaMetaData | nu

const memberListItemInsertFunction = (parent: Element) => {
if (parent.children.length > 1) {
const path = window.location.pathname
const memberText = parent.children[1] as HTMLElement
const tipElem = createBraveTipAction(memberText as Element, getMemberListItemMetaData)
if (!memberText) {
if (!memberText || path.startsWith('/orgs/')) {
return
}
tipElem.style.paddingLeft = '5px'
if (window.location.pathname.split('/').includes('teams')) { // Special case, different styling for same element
if (path.split('/').includes('teams')) { // Special case, different styling for same element
memberText.appendChild(tipElem)
} else {
memberText.style.width = '250px'
Expand Down

0 comments on commit 7b0a8cb

Please sign in to comment.