Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mdashraful305 committed Jan 20, 2024
1 parent ab9dcc2 commit 6dd34f1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
Binary file added assets/img/400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/404.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
24 changes: 14 additions & 10 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ $(document).ready(function () {
} ,
error:function (xhr, ajaxOptions, thrownError) {
if(xhr.status==0){
netError("cout");
netError("error");
}

}
Expand All @@ -97,7 +97,7 @@ $(document).ready(function () {
setTimeout(function(){
$("#overlay").fadeOut(300);
},200);
netError("fail");
netError("404");
});
});

Expand All @@ -113,18 +113,22 @@ function init(){
$("#reset").addClass('d-none');
$(".emp-profile").addClass('d-none');
$(".no-date").addClass('d-none');
$(".net_error").addClass('d-none');
$(".n_found").addClass('d-none');
$(".net_error_508").addClass('d-none');
$(".net_error_404").addClass('d-none');
}

function netError(net) {
if(net=="fail"){
$(".n_found").removeClass('d-none');
}else if(net=="cout"){
$(".net_error").removeClass('d-none');
}else{
$(".n_found").removeClass('d-none');
}

$("#reset").removeClass('d-none');
$(".no-date").removeClass('d-none');

if(net=="508"){
$(".net_error_508").removeClass('d-none');
}else if(net=="other"){
$(".n_found").removeClass('d-none');
}else if(net=="404"){
$(".net_error_404").removeClass('d-none');
}

}
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ <h2>Codeforce Account Info </h2>
</div>
<div class="container no-date emp-profile d-none text-center">
<img src="assets/img/no_data.png" alt="" width="auto" class="d-none n_found">
<img src="assets/img/net_error.jpg" alt="" width="auto" class="d-none net_error">
<img src="assets/img/508.jpg" alt="" width="auto" class="d-none net_error_508">
<img src="assets/img/400.png" alt="" width="auto" class="d-none net_error_404">
</div>
<div class="container emp-profile d-none">

Expand Down

0 comments on commit 6dd34f1

Please sign in to comment.