Advertisement
Guest User

MMA Tycoon Fighter Hype/Pop/KT/Grappling Value

a guest
Jul 3rd, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           MMA Tycoon Fighter Hype/Pop/KT/Grappling Value
  3. // @namespace      http://www.tycoontoo...emonkey-scripts
  4. // @description    This script shows the exact Hype/Pop/KT/Grappling value on the fighter's profile page.
  5. // @include        http://www.mmatycoon.com/fighterprofilemanager.php*
  6. // @include        http://www.mmatycoon.com/fighterprofilepublic.php*
  7. // @include        http://mmatycoon.com/fighterprofilemanager.php*
  8. // @include        http://mmatycoon.com/fighterprofilepublic.php*
  9. // @include        http://www.mmatycoon.com/orgpublic.php*
  10. // @version        1.2
  11. // @author         Mario Dojder (gitlab@dojder.de)
  12. // @require        http://code.jquery.com/jquery-latest.js
  13. // @grant          none
  14. // ==/UserScript==
  15.  
  16. $(document).ready(function () {
  17.  
  18.     var hypeValue = $("td[background*='images/barred']").attr("width").replace("%", "");
  19.     hypeValue = (hypeValue * 10).toFixed(0);
  20.  
  21.     var popValue = $("td[background*='images/barblue']").attr("width").replace("%", "");
  22.     popValue = (popValue * 10).toFixed(0);
  23.  
  24.     $("td[background*='images/barred']").next().append('<div style="position:relative;"><span id="hype"></span></div>');
  25.     $("td[background*='images/barblue']").next().append('<div style="position:relative;"><span id="pop"></span></div>');
  26.  
  27.     $("#hype, #pop, #kt, #tgwc").css({
  28.         "position": "absolute",
  29.         "top": "-5px",
  30.         "right": "3px",
  31.         "font-size": "10px",
  32.         "font-weight": "bold"
  33.     });
  34.  
  35.     $("#hype").html(hypeValue);
  36.     $("#pop").html(popValue);
  37.  
  38.     if ($("a:contains('Kickboxing Hype')").length > 0) {
  39.         var ktElement = $("a:contains('Kickboxing Hype')").parent("strong").parent("td").next().find("td[background*='images/barredkt']");
  40.         var ktValue = ktElement.attr("width").replace("%", "");
  41.         ktValue = (ktValue * 10).toFixed(0);
  42.         $(ktElement).next().append('<div style="position:relative;"><span id="kt"></span></div>');
  43.         $("#kt").html(ktValue);
  44.     }
  45.  
  46.     if ($("a:contains('Grappling Hype')").length > 0) {
  47.         var tgwcElement = $("a:contains('Grappling Hype')").parent("strong").parent("td").next().find("td[background*='images/barredkt']");
  48.         var tgwcValue = tgwcElement.attr("width").replace("%", "");
  49.         tgwcValue = (tgwcValue * 10).toFixed(0);
  50.         $(tgwcElement).next().append('<div style="position:relative;"><span id="tgwc"></span></div>');
  51.         $("#tgwc").html(tgwcValue);
  52.     }
  53.  
  54.     $("#kt, #tgwc").css({
  55.         "position": "absolute",
  56.         "top": "-5px",
  57.         "right": "3px",
  58.         "font-size": "10px",
  59.         "font-weight": "bold"
  60.     });
  61. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement