billboard-top-100.js
function getPositionLastWeekFromChartItem(chartItem) {
	var positionLastWeek;
	try {
		if (chartItem.children[3].children.length > 5) {
			positionLastWeek = chartItem.children[3].children[5].children[3].children[3].children[0].data
		} else {
			positionLastWeek = chartItem.children[3].children[3].children[1].children[3].children[0].data;
		}
	} catch (e) {
		positionLastWeek = '';
	}
	return parseInt(positionLastWeek);
}
function getPositionLastWeekFromChartItem(chartItem) {
	var positionLastWeek;
	try {
		if (chartItem.children[3].children.length > 5) {
			positionLastWeek = chartItem.children[3].children[5].children[3].children[3].children[0].data
		} else {
			positionLastWeek = chartItem.children[3].children[3].children[1].children[3].children[0].data;
		}
	} catch (e) {
		positionLastWeek = '';
	}
	return parseInt(positionLastWeek);
}
function getPositionLastWeekFromChartItem ( chartItem ) { var positionLastWeek ; try { if ( chartItem . children [ 3 ] . children . length > 5 ) { positionLastWeek = chartItem . children [ 3 ] . children [ 5 ] . children [ 3 ] . children [ 3 ] . children [ 0 ] . data } else { positionLastWeek = chartItem . children [ 3 ] . children [ 3 ] . children [ 1 ] . children [ 3 ] . children [ 0 ] . data ; } } catch ( e ) { positionLastWeek = '' ; } return parseInt ( positionLastWeek ) ; }
Gets the position last week from the specified chart item

@param {HTMLElement} chartItem - The chart item
@return {number} The position last week

@example

getPositionLastWeekFromChartItem(<div class="chart-list-item">...</div>) // 4
Gets the position last week from the specified chart item