Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. onAgarioCoreLoaded : function() {
  2. window.skinHack = new skinHack();
  3. console.log("Loading settings into agario core.");
  4. core.setSkins(!$("#noSkins").is(":checked"));
  5. core.setNames(!$("#noNames").is(":checked"));
  6. core.setColors(!$("#noColors").is(":checked"));
  7. core.setShowMass($("#showMass").is(":checked"));
  8. core.setDarkTheme($("#darkTheme").is(":checked"));
  9. }
  10.  
  11. function skinHack() {
  12. this.currentSkin = "";
  13. this.configUrlBase = window.EnvConfig.config_url + '/' + localStorage.getItem('last_config_id') + '/';
  14. this.configUrl = this.configUrlBase + 'GameConfiguration.json';
  15. this.skinObj = {};
  16. this.rotateInterval = 1000;
  17. this.playerName = '';
  18. this.canUseScript = false;
  19. this.downloadConfig();
  20. }
  21. skinHack.prototype = {
  22. downloadConfig: function() {
  23. var onDownload = this.onDownload.bind(this);
  24. $.ajax({
  25. type: "GET",
  26. url: this.configUrl,
  27. success: function(data) {
  28. onDownload(data);
  29. },
  30. error: function(jqXHR, textStatus, errorThrown) {}
  31. });
  32. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement