mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 22:44:24 +01:00
Replace load_location_hash with a callback
This commit is contained in:
@@ -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
|
load_user_solves(function () { // Load the user's solved challenge ids
|
||||||
loadchals(function () { // Load the full list of challenges
|
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() {
|
$(function() {
|
||||||
update();
|
update(function(){
|
||||||
|
load_location_hash();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.nav-tabs a').click(function (e) {
|
$('.nav-tabs a').click(function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user