NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Retro Server Galaxy Redesign // @namespace redesign_retro_server // @description Change CSS opacity property of banned, vacation users and empty positions in galaxy // @include http://ogame1304.de/game/index.php?page=galaxy* // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js // @author JBWKZ2099 // @version 1.0 // @grant none // ==/UserScript== $(document).ready(function() { $("input[name='galaxyLeft']").val(""); $("input[name='galaxyRight']").val(""); $("input[name='systemLeft']").val(""); $("input[name='systemRight']").val(""); for (var i=3; i<=17; i++) { var selector = "table[width='569'] tbody > :nth-child("+i+")"; $(selector).css("opacity", "0.4"); } /*Vacation users*/ if( $("tr th a").find('.vacation') ){ $("tr th a").find('.vacation').parents("tr").css("opacity", "0.4"); $("tr th a").find('.vacation').parents("tr").addClass("vacation_mode"); } /*Banned users*/ if( $("tr th a").find('.banned') ){ $("tr th a").find('.banned').parents("tr").css("opacity", "0.4"); $("tr th a").find('.banned').parents("tr").addClass("banned_user"); } /*This is to identify which rows won't be transparent */ /*Normal user*/ if( $("tr th a").find('.normal') ){ $("tr th a").find('.normal').parents("tr").css("opacity", "1"); $("tr th a").find('.normal').parents("tr").addClass("normal_user"); } /*Strong user*/ if( $("tr th a").find('.strong') ){ $("tr th a").find('.strong').parents("tr").css("opacity", "1"); $("tr th a").find('.strong').parents("tr").addClass("strong_user"); } /*Noob user*/ if( $("tr th a").find('.noob') ){ $("tr th a").find('.noob').parents("tr").css("opacity", "1"); $("tr th a").find('.noob').parents("tr").addClass("noob_user"); } /*Inactive user*/ if( $("tr th a").find('.inactive') ){ $("tr th a").find('.inactive').parents("tr").css("opacity", "1"); $("tr th a").find('.inactive').parents("tr").addClass("inactive_user"); } /*Long Inactive user*/ if( $("tr th a").find('.longinactive') ){ $("tr th a").find('.longinactive').parents("tr").css("opacity", "1"); $("tr th a").find('.longinactive').parents("tr").addClass("longinactive_user"); } });