Proveiling Totals

Adds totals per auction on mylots of proveiling.nl

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Proveiling Totals
// @namespace   nl.veiling.pro
// @description Adds totals per auction on mylots of proveiling.nl
// @include     http://www.proveiling.nl/MyLots.aspx
// @version     1
// @grant       none
// ==/UserScript==

var ch = $("td");
var cost = 0;

$("#itemPlaceholderContainer tr").each(function() {
  if ($(this).data("type") === "header") {   	
    cost = 0;    
    ch = $(this).children("td");
    ch.append($("<strong class='total right'>-</strong>"))
  }
  if ($(this).hasClass("clickable")) {
    cost = cost + parseFloat($(this).find("#next").text().replace(/,/, '.'));
    ch.children(".total").text("€ " + parseFloat(Math.round(cost * 100) / 100).toFixed(2).replace('.', ','));
  }
});