ToKaTpoHb / auto_settings_agario

// ==UserScript==
// @name         auto_settings_agario
// @version      1.0
// @autor        ToKaTpoHb
// @supportURL   https://openuserjs.org/scripts/ToKaTpoHb/auto_settings_agario/issues
// @match        http://agar.io/
// @grant        none
// @description  This script will automatically change settings on agar.io, so you don't neet to do it  every time
// @downloadURL  https://openuserjs.org/install/ToKaTpoHb/auto_settings_agario.user.js
// ==/UserScript==

// Settings block-------------------------------------
// Set name
var name = 'BestNameEver';

// If true, it`ll click on ckeckbox
var settings = {
no_skins : true , 
no_names : false ,
no_colors : false ,
show_mass : true ,
dark_theme : true ,
skip_stats : true ,
};
// -------------------------------------


$('.btn-login').click();

$('#settings, #instructions').toggle();

var set = new Array();
for(var key in settings){
    if(settings.hasOwnProperty(key)){
        set.push(settings[key]);
    }
}

$('input[type=checkbox]').each(function(index){
     if(set[index])
	     $(this).click();
});

$('#nick').val(name);