Skip to content

Instantly share code, notes, and snippets.

@Rast1234
Last active December 30, 2015 13:49
Show Gist options
  • Select an option

  • Save Rast1234/7838300 to your computer and use it in GitHub Desktop.

Select an option

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)
$('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