Replace load_location_hash with a callback

This commit is contained in:
Kevin Chung
2018-01-04 22:50:14 -05:00
parent 282acb4e63
commit 6153cc30b4

View File

@@ -342,16 +342,18 @@ var load_location_hash = function () {
}
};
function update(){
function update(cb){
load_user_solves(function () { // Load the user's solved challenge ids
loadchals(function () { // Load the full list of challenges
updatesolves(load_location_hash); // Load the counts of all challenge solves and then load the location hash specified challenge
updatesolves(cb); // Load the counts of all challenge solves and then load the location hash specified challenge
});
});
}
$(function() {
update();
update(function(){
load_location_hash();
});
});
$('.nav-tabs a').click(function (e) {