// ==UserScript== // @name Voorash Inline Tier Charts // @namespace voorash // @description This will provide an inline tier chart for DotD on Armor games // @include http://armorgames.com/dawn-of-the-dragons-game/13509 // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js // @version 1 // @grant none // @downloadURL none // ==/UserScript== var gameCanvas = document.getElementById('gamearea'); var newdiv = document.createElement('div'); newdiv.setAttribute('id','voorashTierDiv'); newdiv.innerHTML = '
NameAPOSMin TierMax TierAll Tiers
Apocolocyntosised Demon20m20m20m180mEvery 20 mil from Min Tier to Max Tier
'; var newdiv2 = document.createElement('div'); newdiv2.setAttribute('id','voorashTierButtonDiv'); newdiv2.innerHTML = 'Show Tiers'; var newCanvas = document.createElement('canvas'); newCanvas.setAttribute('id','voorashTierCanvas'); newCanvas.setAttribute('class', 'modalTierCanvasOn'); newCanvas.setAttribute('position','absolute'); newCanvas.setAttribute('left','0px'); newCanvas.setAttribute('z-index','100000'); newdiv.appendChild(newCanvas); gameCanvas.appendChild(newdiv); gameCanvas.appendChild(newdiv2); //var gameLocation = $('#gamefilearea').css(property) $("#voorashTierDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"}); $("#voorashTierButtonDiv").css({"position":"fixed","top":"0px","left":"0px","z-index":"100000","background-color":"white"}); $("#voorashTierDiv").hide(); $("#voorashTierButtonDiv").show(); var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.text = "$(document).delegate(\"#voorashTierDiv\", \"click\", function() {$(\"#voorashTierDiv\").hide(); $(\"#voorashTierButtonDiv\").show();});"; $("head").append( script ); var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.text = "$(document).delegate(\"#voorashTierButtonDiv\", \"click\", function() {$(\"#voorashTierButtonDiv\").hide(); $(\"#voorashTierDiv\").show();});"; $("head").append( script );