CryptalEquine / Horse Stat Revealer

// ==UserScript==
// @name          Horse Stat Revealer
// @namespace     cryptal
// @description   For Howrse: Reveals the decimal points for energy, health & morale
// @author        CryptalEquine
// @include       */elevage/chevaux/cheval?id=*
// @version       1.1
// @run-at        document-start
// @noframes      true
// @grant         unsafeWindow
// @grant         GM_log
// @grant         GM_openInTab
// @require       https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
// @require       https://gist.githubusercontent.com/BrockA/2625891/raw/9c97aa67ff9c5d56be34a55ad6c18a314e5eb548/waitForKeyElements.js
// @updateURL     https://openuserjs.org/meta/CryptalEquine/Horse_Stat_Revealer.meta.js
// ==/UserScript==

waitForKeyElements("#energie", function(e) { ChangeElement(e, 'Energie'); }, true);
waitForKeyElements("#sante", function(e) { ChangeElement(e, 'Sante'); }, true);
waitForKeyElements("#moral", function(e) { ChangeElement(e, 'Moral'); }, true);

function ChangeElement(element, type)
{
   element[0].addEventListener("DOMNodeInserted", function () {
      $(element).html(unsafeWindow['cheval' + type].toFixed(1));
   }, false);
   
   $(element).html(unsafeWindow['cheval' + type].toFixed(1));
}