fix bug
This commit is contained in:
parent
9700444420
commit
94b8b9788c
12
code.js
12
code.js
@ -7,7 +7,7 @@
|
||||
|
||||
/**
|
||||
* Получает данные из элемента `div.badge_row`
|
||||
* @param {DOM} value - div.badge_row.
|
||||
* @param {Array} value - div.badge_row.
|
||||
* @returns {Object}
|
||||
*/
|
||||
function getData(value) {
|
||||
@ -22,14 +22,14 @@ function getData(value) {
|
||||
// check left cards
|
||||
// для металлических карточек нет параметра 'карточек выпадет'
|
||||
let cardsDropLeft = 0;
|
||||
if (value.getElementsByClassName('progress_info_bold')[0]) {
|
||||
cardsDropLeft = value.getElementsByClassName('progress_info_bold')[0].match(/\d/g);
|
||||
if (value[1].getElementsByClassName('progress_info_bold')[0]) {
|
||||
cardsDropLeft = value[1].getElementsByClassName('progress_info_bold')[0].match(/\d/g);
|
||||
}
|
||||
|
||||
let badgeItem = {
|
||||
id: value.childNodes[1].href.split('/')[6],
|
||||
uri: value.childNodes[1].href,
|
||||
name: value.childNodes[3].childNodes[1].childNodes[3].childNodes[0].nodeValue.replace(/[\r\n\t]/g, ''),
|
||||
id: value[1].childNodes[1].href.split('/')[6],
|
||||
uri: value[1].childNodes[1].href,
|
||||
name: value[1].childNodes[3].childNodes[1].childNodes[3].childNodes[0].nodeValue.replace(/[\r\n\t]/g, ''),
|
||||
dropLeft: cardsDropLeft,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user