This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// visit: https://just-eat.dk/member/prevorders | |
// run it once per year | |
var siblings = $('#ctl00_ContentPlaceHolder1_rightbox a[href^="javascript:__doPostBack(\'ctl00$ContentPlaceHolder1$ctl00$ctl"').siblings(), | |
sum = isNaN(localStorage.getItem('JE')) ? 0 : parseInt(localStorage.getItem('JE'), 10), | |
yearSum = 0; | |
$('#ctl00_ContentPlaceHolder1_rightbox table tbody tr').each(function(){ | |
var amount = parseInt($(this).find('td').eq(3).find('div').find('div').eq(0).text(), 10); | |
if (isNaN(amount)) return; | |
yearSum += amount; | |
}); |