Add total-cost.preisboerse24

This commit is contained in:
Jan Bader 2016-05-13 15:05:11 +02:00
parent 3f4ccf9363
commit 34823598a5

View File

@ -0,0 +1,26 @@
// ==UserScript==
// @name Gesamtkosten Preisboerse24
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Berechnet die Gesamtkosten der Verträge auf preisboerse24.de
// @author Jan Bader <jan@javil.eu>
// @match http*://www.preisboerse24.de/*
// @updateUrl https://git.javil.eu/jacob1123/userscripts/raw/master/total-cost.preisboerse24.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
jQuery("#Grid li.boxed").each(
function(i, tarif) {
var grundgebuehr = Math.round(jQuery(tarif).data("monatlich"), 2);
var anzahlung = jQuery(tarif).data("geraet");
var gesamt = grundgebuehr * 24 + anzahlung;
var details = jQuery(tarif).find(".geraetepreis");
var header = jQuery(tarif).find(".title").text().replace(/^\s+|\s+$/g, '');
var info = (grundgebuehr * 24) + " + " + anzahlung + " = " + gesamt;
details.append(info+"<br />");
console.log(header + ": " + info);
}
);
})();