Toggle navigation
Toggle navigation
This project
Loading...
Sign in
전세계
/
FakerQuiz
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
전세계
2020-06-03 18:59:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
feb7888d461963b4b465c2c5659021bb902923ba
feb7888d
1 parent
a7ba45ae
리팩토링: 대회 별 전적 Json 구조 변경 및 코드 간소화
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
app.js
app.js
View file @
feb7888
...
...
@@ -85,29 +85,30 @@ getHTML()
//#region 대회 별 전적
var
tr
=
$
(
'div.scriptorium'
).
children
(
'div.listTable'
).
eq
(
3
).
find
(
'table tbody'
).
children
();
var
competition
List
=
[]
;
var
competition
Data
=
{}
;
tr
.
each
(
function
(
i
,
elem
)
{
competitionList
[
i
]
=
{
name
:
$
(
this
).
children
().
eq
(
0
).
text
().
replace
(
$
(
this
).
children
().
eq
(
0
).
find
(
'span'
).
text
(),
''
),
totalGamePlay
:
$
(
this
).
children
().
eq
(
1
).
text
(),
totalWin
:
$
(
this
).
children
().
eq
(
2
).
text
(),
totalLose
:
$
(
this
).
children
().
eq
(
3
).
text
(),
winRate
:
$
(
this
).
children
().
eq
(
4
).
text
(),
totalKill
:
$
(
this
).
children
().
eq
(
5
).
text
(),
totalDeath
:
$
(
this
).
children
().
eq
(
6
).
text
(),
totalAssist
:
$
(
this
).
children
().
eq
(
7
).
text
(),
killPerMatch
:
$
(
this
).
children
().
eq
(
8
).
text
(),
deathPerMatch
:
$
(
this
).
children
().
eq
(
9
).
text
(),
assistPerMatch
:
$
(
this
).
children
().
eq
(
10
).
text
(),
kDA
:
$
(
this
).
children
().
eq
(
11
).
text
(),
kP
:
$
(
this
).
children
().
eq
(
12
).
text
()
var
td
=
$
(
this
).
children
();
var
competitionName
=
td
.
eq
(
0
).
text
().
replace
(
td
.
eq
(
0
).
find
(
'span'
).
text
(),
''
);
competitionData
[
competitionName
]
=
{
name
:
competitionName
,
totalGamePlay
:
td
.
eq
(
1
).
text
(),
totalWin
:
td
.
eq
(
2
).
text
(),
totalLose
:
td
.
eq
(
3
).
text
(),
winRate
:
td
.
eq
(
4
).
text
(),
totalKill
:
td
.
eq
(
5
).
text
(),
totalDeath
:
td
.
eq
(
6
).
text
(),
totalAssist
:
td
.
eq
(
7
).
text
(),
killPerMatch
:
td
.
eq
(
8
).
text
(),
deathPerMatch
:
td
.
eq
(
9
).
text
(),
assistPerMatch
:
td
.
eq
(
10
).
text
(),
kDA
:
td
.
eq
(
11
).
text
(),
kP
:
td
.
eq
(
12
).
text
()
};
});
fakerData
[
'competitions'
]
=
{
list
:
competitionList
}
fakerData
[
'competitions'
]
=
competitionData
;
//#endregion
//#region 챔피언 별 전적
...
...
Please
register
or
login
to post a comment