Skip to content

Commit

Permalink
fix show elo estimation, add newElo
Browse files Browse the repository at this point in the history
  • Loading branch information
leedrum committed Sep 21, 2022
1 parent 2e91d9e commit 7865825
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Binary file modified faceit-enhancer-fixed-show-elo-estimation.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/content/features/add-match-room-elo-estimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ export default async parent => {
}

parent = document.querySelector('#parasite-container').shadowRoot
const factionNameElement1 = parent.querySelectorAll('h6.sc-iHLYve')[1]
const factionNameElement1 = parent.querySelectorAll('h6')[1]

const factionNameElement2 = parent.querySelectorAll('h6.sc-iHLYve')[0]
const factionNameElement2 = parent.querySelectorAll('h6')[0]

// Let eloElements = factions.map((faction, i) => {
factions.filter((faction, i) => {
Expand Down
9 changes: 1 addition & 8 deletions src/content/features/add-player-profile-matches-elo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsx h */
import { h } from 'dom-chef'
import select from 'select-dom'
import { getPlayer, getPlayerMatches, getSelf } from '../helpers/faceit-api'
import { getPlayer, getPlayerMatches } from '../helpers/faceit-api'
import { getEloChangesByMatches } from '../helpers/elo'
import {
getPlayerProfileNickname,
Expand All @@ -11,7 +11,6 @@ import {
hasFeatureAttribute,
setFeatureAttribute
} from '../helpers/dom-element'
import { getIsFreeMember } from '../helpers/membership'

const FEATURE_ATTRIBUTE = 'matches-elo'

Expand Down Expand Up @@ -46,8 +45,6 @@ export default async parentElement => {
const nickname = getPlayerProfileNickname()
const game = getPlayerProfileStatsGame()
const player = await getPlayer(nickname)
const self = await getSelf()
const selfIsFreeMember = getIsFreeMember(self)

const matches = await getPlayerMatches(
player.id,
Expand Down Expand Up @@ -90,10 +87,6 @@ export default async parentElement => {

resultElement.textContent += ` (${eloDiff >= 0 ? '+' : ''}${eloDiff})`

if (selfIsFreeMember) {
return
}

const newEloElement = (
<div
style={{
Expand Down

0 comments on commit 7865825

Please sign in to comment.