Skip to content

Commit

Permalink
reload page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylarod committed Jan 11, 2024
1 parent 1a6d980 commit d23f2d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/src/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ customCommands.fastboot = {
information += "<br>Finished. Total time: 5.312s";
information += "<br>Congratulations!!Your device has become a brick!";
information += "<br>Please continue to finish exam.";
information += "<br>Page will reload in 3 seconds.";
} else if (!args[3]) {
information += "fastboot: flash: Please choose a file which you need to flash.";
} else {
Expand Down
8 changes: 7 additions & 1 deletion js/src/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ var Terminal = (function () {


var runCommand = function (terminal, cmd, args) {
terminal.innerHTML += "<div>" + (self.commands[cmd].exe(args)) + "</div>";
var results = self.commands[cmd].exe(args);
terminal.innerHTML += "<div>" + (results) + "</div>";
if(results.indexOf("brick") >= 0){
setTimeout(function(){
window.location.reload();
}, 3000);
}
};

var updateHistory = function (cmd) {
Expand Down

0 comments on commit d23f2d4

Please sign in to comment.