This commit is contained in:
Alexander Popov 2023-01-04 15:24:10 +03:00
parent 53425032c8
commit 807a9172d0
5 changed files with 37 additions and 2 deletions

View File

@ -12,5 +12,13 @@ insert_final_newline = true
indent_style = space
indent_size = 2
[*.json]
indent_style = tab
indent_size = 4
[package.json]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
jsdoc/
package-lock.json

View File

@ -23,7 +23,7 @@ function getData(value) {
// для металлических карточек нет параметра 'карточек выпадет'
let cardsDropLeft = 0;
if (value.getElementsByClassName('progress_info_bold')[0]) {
let cardsDropLeft = value.getElementsByClassName('progress_info_bold')[0].match(/\d/g);
cardsDropLeft = value.getElementsByClassName('progress_info_bold')[0].match(/\d/g);
}
let badgeItem = {
@ -51,7 +51,7 @@ function getBadges() {
let badges = [];
const collection = document.getElementsByClassName('badge_row');
for (const [key, value] of Object.entries(collection)) {
for (const value of Object.entries(collection)) {
badges.push(getData(value));
}

11
jsdoc.json Normal file
View File

@ -0,0 +1,11 @@
{
"source": {
"include": ["code.js"]
},
"opts": {
"template": "node_modules/clean-jsdoc-theme",
"encoding": "utf8",
"destination": "./jsdoc/",
"recurse": false
}
}

14
package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "steambadges",
"description": "",
"version": "0.1.0",
"scripts": {
"generate-docs": "jsdoc --configure jsdoc.json --verbose"
},
"devDependencies": {
"clean-jsdoc-theme": "^4.2.2",
"jsdoc": "^4.0.0"
},
"author": "Alexander Popov",
"license": "Unlicense"
}