Voorash Inline Tier Charts

This will provide an inline tier chart for DotD on Armor games

  1. // ==UserScript==
  2. // @name Voorash Inline Tier Charts
  3. // @namespace voorash
  4. // @description This will provide an inline tier chart for DotD on Armor games
  5. // @include http://armorgames.com/dawn-of-the-dragons-game/13509
  6. // @include http://www.27thdimension.com/dotd/tierChartsStandalone.html
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
  8. // @version 1.5
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. var lowTiers = "<img src='http://www.27thdimension.com/dotd/tierData/lowTiers.png'>";
  13. var highTiers = "<img src='http://www.27thdimension.com/dotd/tierData/highTiers.jpg'>";
  14. var guildTiers = "<img src='http://www.27thdimension.com/dotd/tierData/guildTiers.jpg'>";
  15. var campTiers = "<img src='http://www.27thdimension.com/dotd/tierData/campTiers.jpg'>";
  16.  
  17. // Create Tier Divs
  18.  
  19. var gameCanvas = document.getElementById('gamearea');
  20. var lowTierDiv = document.createElement('div');
  21. lowTierDiv.setAttribute('id','voorashLowTierDiv');
  22. lowTierDiv.innerHTML = lowTiers;
  23.  
  24. var highTierDiv = document.createElement('div');
  25. highTierDiv.setAttribute('id','highTierDiv');
  26. highTierDiv.innerHTML = highTiers;
  27.  
  28. var guildTierDiv = document.createElement('div');
  29. guildTierDiv.setAttribute('id','guildTierDiv');
  30. guildTierDiv.innerHTML = guildTiers;
  31.  
  32. var campTierDiv = document.createElement('div');
  33. campTierDiv.setAttribute('id','campTierDiv');
  34. campTierDiv.innerHTML = campTiers;
  35.  
  36.  
  37. // Create button divs
  38. var voorashLowTierButtonDiv = document.createElement('div');
  39. voorashLowTierButtonDiv.setAttribute('id','voorashLowTierButtonDiv');
  40. voorashLowTierButtonDiv.innerHTML = 'Z1-Z9';
  41.  
  42.  
  43. var voorashHighTierButtonDiv = document.createElement('div');
  44. voorashHighTierButtonDiv.setAttribute('id','voorashHighTierButtonDiv');
  45. voorashHighTierButtonDiv.innerHTML = 'Z10+';
  46.  
  47. var voorashGuildTierButtonDiv = document.createElement('div');
  48. voorashGuildTierButtonDiv.setAttribute('id','voorashGuildTierButtonDiv');
  49. voorashGuildTierButtonDiv.innerHTML = 'Guild';
  50.  
  51. var voorashCampTierButtonDiv = document.createElement('div');
  52. voorashCampTierButtonDiv.setAttribute('id','voorashCampTierButtonDiv');
  53. voorashCampTierButtonDiv.innerHTML = 'Camp';
  54.  
  55.  
  56. gameCanvas.appendChild(lowTierDiv);
  57. gameCanvas.appendChild(highTierDiv);
  58. gameCanvas.appendChild(guildTierDiv);
  59. gameCanvas.appendChild(campTierDiv);
  60.  
  61.  
  62.  
  63. gameCanvas.appendChild(voorashLowTierButtonDiv);
  64. gameCanvas.appendChild(voorashHighTierButtonDiv);
  65. gameCanvas.appendChild(voorashGuildTierButtonDiv);
  66. gameCanvas.appendChild(voorashCampTierButtonDiv);
  67.  
  68.  
  69. $("#voorashLowTierDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"});
  70. $("#voorashLowTierDiv").hide();
  71. $("#highTierDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"});
  72. $("#highTierDiv").hide();
  73. $("#guildTierDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"});
  74. $("#guildTierDiv").hide();
  75. $("#campTierDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"});
  76. $("#campTierDiv").hide();
  77.  
  78. var divWidth = "40px";
  79. $("#voorashLowTierButtonDiv").css({"position":"fixed","top":"0px","left":"0px","width":divWidth,"border": "1px solid", "z-index":"99","background-color":"white"});
  80. $("#voorashLowTierButtonDiv").show();
  81. $("#voorashHighTierButtonDiv").css({"position":"fixed","top":"20px","left":"0px","width":divWidth,"border": "1px solid","z-index":"99","background-color":"white"});
  82. $("#voorashHighTierButtonDiv").show();
  83. $("#voorashGuildTierButtonDiv").css({"position":"fixed","top":"40px","left":"0px","width":divWidth,"border": "1px solid","z-index":"99","background-color":"white"});
  84. $("#voorashGuildTierButtonDiv").show();
  85. $("#voorashCampTierButtonDiv").css({"position":"fixed","top":"60px","left":"0px","width":divWidth,"border": "1px solid","z-index":"99","background-color":"white"});
  86. $("#voorashCampTierButtonDiv").show();
  87.  
  88. // Low Tier Div Show and Hide
  89. var script = document.createElement( 'script' );
  90. script.type = 'text/javascript';
  91. script.text = "$(document).delegate(\"#voorashLowTierDiv\", \"click\", function() {$(\"#voorashLowTierDiv\").hide();});";
  92. $("head").append( script );
  93.  
  94.  
  95. var script = document.createElement( 'script' );
  96. script.type = 'text/javascript';
  97. script.text = "$(document).delegate(\"#voorashLowTierButtonDiv\", \"click\", function() {$(\"#voorashLowTierDiv\").show();});";
  98. $("head").append( script );
  99.  
  100. // High Tier Div Show and Hide
  101. var script = document.createElement( 'script' );
  102. script.type = 'text/javascript';
  103. script.text = "$(document).delegate(\"#highTierDiv\", \"click\", function() {$(\"#highTierDiv\").hide();});";
  104. $("head").append( script );
  105.  
  106. var script = document.createElement( 'script' );
  107. script.type = 'text/javascript';
  108. script.text = "$(document).delegate(\"#voorashHighTierButtonDiv\", \"click\", function() {$(\"#highTierDiv\").show();});";
  109. $("head").append( script );
  110.  
  111. // Guild Tier Div Show and Hide
  112. var script = document.createElement( 'script' );
  113. script.type = 'text/javascript';
  114. script.text = "$(document).delegate(\"#guildTierDiv\", \"click\", function() {$(\"#guildTierDiv\").hide();});";
  115. $("head").append( script );
  116.  
  117. var script = document.createElement( 'script' );
  118. script.type = 'text/javascript';
  119. script.text = "$(document).delegate(\"#voorashGuildTierButtonDiv\", \"click\", function() {$(\"#guildTierDiv\").show();});";
  120. $("head").append( script );
  121.  
  122. // Camp Tier Div Show and Hide
  123. var script = document.createElement( 'script' );
  124. script.type = 'text/javascript';
  125. script.text = "$(document).delegate(\"#campTierDiv\", \"click\", function() {$(\"#campTierDiv\").hide();});";
  126. $("head").append( script );
  127.  
  128. var script = document.createElement( 'script' );
  129. script.type = 'text/javascript';
  130. script.text = "$(document).delegate(\"#voorashCampTierButtonDiv\", \"click\", function() {$(\"#campTierDiv\").show();});";
  131. $("head").append( script );
  132.  
  133.  
  134.  
  135.