Last active
August 29, 2015 14:28
-
-
Save Mehuge/9d4e894ea634324db404 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var handleReceiveConfigVars; | |
cu.OnInitialized(function () { | |
cu.GetConfigVars(Options.activeConfigIndex); | |
cu.Listen('HandleReceiveConfigVars', function(configs) { | |
if (handleReceiveConfigVars) { | |
handleReceiveConfigVars(configs); | |
handleReceiveConfigVars = null; | |
} | |
}); | |
}); | |
$btnSaveDisk.click(function () { | |
var $container = $('#alert-container'); | |
$container.empty(); | |
cuAPI.SaveConfigChanges(); | |
handleReceiveConfigVars = function (configs) { | |
if (configs && Options.activeConfigIndex == 2 /* KEYBIND */) { | |
window.localStorage.setItem('-cse-options-savedkeybinds', configs); | |
var $item = $('<div/>'); | |
$('<div/>').addClass('alert-name').text('Bindings Saved To Disk').appendTo($item); | |
$item.appendTo($container); | |
} | |
}; | |
cuAPI.GetConfigVars(Options.activeConfigIndex); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment