Last active
December 30, 2015 13:49
-
-
Save Rast1234/7838300 to your computer and use it in GitHub Desktop.
http://minus-60.ru/index.php?catalog=8 -
calculates price and koefficient rub/grams;
price with 60% coupon (with cost = 80 rub)
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
| $('div[class=b-container-content-item-col]').each(function(i,e){ | |
| var t = e.textContent; | |
| var tmp = t.split('\n'); | |
| var weight = parseInt(tmp[1]); | |
| var price = parseInt(tmp[2]); | |
| var k = price/weight; | |
| var lol = $("<div><br /><h2>"+k+"<br />$"+(80+price*0.4)+"</h2></div>"); | |
| $(e).append(lol); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment