NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name PVU_Market_Enhancer // @namespace http://tampermonkey.net/ // @version 1.0 // @description PlantVsUndead Market Enhancer // @author rDs // @match https://marketplace.plantvsundead.com/* // @icon https://www.google.com/s2/favicons?domain=plantvsundead.com // @grant none // @require http://code.jquery.com/jquery-3.4.1.min.js // @copyright 2021, rDs (https://openuserjs.org/users/rDs) // @license MIT // @run-at document-end // ==/UserScript== (function () { setInterval(function () { $(".tw-grid").each(function (index) { var num1 = 0; var num2 = 0; var leDiv = ($(this).find(".le").html()); if (!leDiv) { return; } num1 = parseInt(leDiv.split(" ")[8].replace("\n", "").split("/")[0]); num2 = parseInt(leDiv.split(" ")[8].replace("\n", "").split("/")[1]); var price = ($(this).find(".text__green").html()); var le_h = (num1 / num2).toFixed(2); var le_day = (le_h * 24).toFixed(2); var le_month = (le_day * 30).toFixed(2); var pvu_month = (le_h /150 * 24 * 30).toFixed(2); $(this).find(".le_h").remove(); $(this).find(".le_day").remove(); $(this).find(".le_month").remove(); $(this).find(".pvu_month").remove(); $(this).find(".le").append("<div class='le_h'></span>"); $(this).find(".le").find(".le_h").html("LE/H: " + le_h); $(this).find(".le").append("<div class='le_day'></span>"); $(this).find(".le").find(".le_day").html("LE/Day: " + le_day); $(this).find(".le").append("<div class='le_month'></span>"); $(this).find(".le").find(".le_month").html("LE/Month: " + le_month); $(this).find(".le").append("<div class='pvu_month'></span>"); $(this).find(".le").find(".pvu_month").html("PVU/Month: " + pvu_month); if (pvu_month >= price) { $(this).find(".le").find(".pvu_month").css("background-color", "green"); } }); }, 500); })();