NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @version 2.1 // @name CSGO500-ColorShowcase // @description Shows the color of the ongoing roll on CSGO500 // @match http://csgo500.com // @match https://csgo500.com // @license MIT // @noframes // ==/UserScript== // CSGO500 ColorShowcase // by DEADF1SH.s1mplex // http://steamcommunity.com/profiles/76561198192995598 // Credits to Vito for codebase // Version 2.1 // Changed: // Added Text Field // Color Support fully established // ========================================= // Global Vars var socketport = "socket.csgo500.com"; var socket = io(socketport, { transports: ['websocket'] }); var $wrapper = $("#content-mybets"); $wrapper.prepend('<div style="text-align: center;">s1mpleX says:<div class="circle" style="background-color: red;height: 20px;width: 20px;border-radius: 10px;display: inline-block;vertical-align: bottom;margin-left: 10px;padding-left: 21px;"></div></div>'); socket.on('round', function(data) { var blue = [1, 9, 11, 19, 21, 33, 35, 43, 45, 53]; var gold = [0]; if (blue.indexOf(data.winner.random) != -1) { $wrapper.find(".circle").css("background-color", "#45B5DA"); } else if (gold.indexOf(data.winner.random) != -1) { $wrapper.find(".circle").css("background-color", "#FFC870"); } else if(data.winner.random % 2 == 0) { $wrapper.find(".circle").css("background-color", "#555"); } else { $wrapper.find(".circle").css("background-color", "#C8354E"); } });