NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name OGame: Campos Disponibles // @description Muestra la cantidad de campos que te quedan disponibles en un planeta // @version 1.3 // @creator jgarrone // @copyright 2016, jgarrone // @license MIT // @homepageURL https://openuserjs.org/scripts/jgarrone/OGame_Campos_disponibles // @supportURL https://openuserjs.org/scripts/jgarrone/OGame_Campos_disponibles/issues // @include http://*.ogame.gameforge.com/game/index.php?page=* // @include https://*.ogame.gameforge.com/game/index.php?page=* // @grant none // Script original escrito por su autor // tiene las correcciones oportunas para su adaptación a la nueva versión V6. // ==/UserScript== (function () { /* START SCRIPT */ var calculateAvailableFields = (function () { $('.smallplanet').each(function( index ) { var fields = (($(this).html()).split("km (")[1]).split(")")[0]; var used = fields.split("/")[1]; var available = fields.split("/")[1] - fields.split("/")[0]; var availableString = (available > 9 ? '<font style="color: lime">' : '<font style="color: red">') + available + '/' + used + '</font> '; var newText = availableString + $(this).find(".planet-name").text(); $(this).find(".planet-name").html( newText ); }); }).toString (); var script = document.createElement ("script"); script.setAttribute ("type", "application/javascript"); script.textContent = "(" + calculateAvailableFields + ") ();"; document.body.appendChild (script); /* !SCRIPT */ })();