Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onAgarioCoreLoaded : function() {
- window.skinHack = new skinHack();
- console.log("Loading settings into agario core.");
- core.setSkins(!$("#noSkins").is(":checked"));
- core.setNames(!$("#noNames").is(":checked"));
- core.setColors(!$("#noColors").is(":checked"));
- core.setShowMass($("#showMass").is(":checked"));
- core.setDarkTheme($("#darkTheme").is(":checked"));
- }
- function skinHack() {
- this.currentSkin = "";
- this.configUrlBase = window.EnvConfig.config_url + '/' + localStorage.getItem('last_config_id') + '/';
- this.configUrl = this.configUrlBase + 'GameConfiguration.json';
- this.skinObj = {};
- this.rotateInterval = 1000;
- this.playerName = '';
- this.canUseScript = false;
- this.downloadConfig();
- }
- skinHack.prototype = {
- downloadConfig: function() {
- var onDownload = this.onDownload.bind(this);
- $.ajax({
- type: "GET",
- url: this.configUrl,
- success: function(data) {
- onDownload(data);
- },
- error: function(jqXHR, textStatus, errorThrown) {}
- });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement