Created
February 8, 2017 08:53
-
-
Save sergiks/23a22e9553c84078ca5d95bddaa0f9e4 to your computer and use it in GitHub Desktop.
Букмарклет для подсчёта выплат за месяц на AppsCentrum (минифицирован)
This file contains hidden or 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
(function(t){var e,n,a,h=$("table"),r={},o=new Date,l="";if(!("my.appscentrum.com"!=window.location.hostname||h.length<4)){for(o.setDate(1),a=0;t>a;a++)e=("0"+(parseInt(o.getMonth())+1)).substr(-2),n=""+o.getFullYear(),r[""+e+"."+n]=0,o.setMonth(o.getMonth()-1);h=h[3],$("tr",h).each(function(t,e){var n,a,h=$("td:nth-child(5)",this).text().split(/[\ \.]/);h.length>=2&&(a=""+h[1]+"."+h[2],r.hasOwnProperty(a)&&(n=$("td:nth-child(3)",this).text(),(n=n.replace(/[^0-9\.]+/g,"")).length&&(r[a]+=parseFloat(n))))});for(key in r)l+=""+Math.round(100*r[key])/100+" руб. за "+key+"\r\n";alert(l)}})(5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Несжатая версия тут.