Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name MMA Tycoon Fighter Hype/Pop/KT/Grappling Value
- // @namespace http://www.tycoontoo...emonkey-scripts
- // @description This script shows the exact Hype/Pop/KT/Grappling value on the fighter's profile page.
- // @include http://www.mmatycoon.com/fighterprofilemanager.php*
- // @include http://www.mmatycoon.com/fighterprofilepublic.php*
- // @include http://mmatycoon.com/fighterprofilemanager.php*
- // @include http://mmatycoon.com/fighterprofilepublic.php*
- // @include http://www.mmatycoon.com/orgpublic.php*
- // @version 1.2
- // @author Mario Dojder (gitlab@dojder.de)
- // @require http://code.jquery.com/jquery-latest.js
- // @grant none
- // ==/UserScript==
- $(document).ready(function () {
- var hypeValue = $("td[background*='images/barred']").attr("width").replace("%", "");
- hypeValue = (hypeValue * 10).toFixed(0);
- var popValue = $("td[background*='images/barblue']").attr("width").replace("%", "");
- popValue = (popValue * 10).toFixed(0);
- $("td[background*='images/barred']").next().append('<div style="position:relative;"><span id="hype"></span></div>');
- $("td[background*='images/barblue']").next().append('<div style="position:relative;"><span id="pop"></span></div>');
- $("#hype, #pop, #kt, #tgwc").css({
- "position": "absolute",
- "top": "-5px",
- "right": "3px",
- "font-size": "10px",
- "font-weight": "bold"
- });
- $("#hype").html(hypeValue);
- $("#pop").html(popValue);
- if ($("a:contains('Kickboxing Hype')").length > 0) {
- var ktElement = $("a:contains('Kickboxing Hype')").parent("strong").parent("td").next().find("td[background*='images/barredkt']");
- var ktValue = ktElement.attr("width").replace("%", "");
- ktValue = (ktValue * 10).toFixed(0);
- $(ktElement).next().append('<div style="position:relative;"><span id="kt"></span></div>');
- $("#kt").html(ktValue);
- }
- if ($("a:contains('Grappling Hype')").length > 0) {
- var tgwcElement = $("a:contains('Grappling Hype')").parent("strong").parent("td").next().find("td[background*='images/barredkt']");
- var tgwcValue = tgwcElement.attr("width").replace("%", "");
- tgwcValue = (tgwcValue * 10).toFixed(0);
- $(tgwcElement).next().append('<div style="position:relative;"><span id="tgwc"></span></div>');
- $("#tgwc").html(tgwcValue);
- }
- $("#kt, #tgwc").css({
- "position": "absolute",
- "top": "-5px",
- "right": "3px",
- "font-size": "10px",
- "font-weight": "bold"
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement