-
Notifications
You must be signed in to change notification settings - Fork 13
Create jQuery instance at first time only #143
Copy link
Copy link
Open
Labels
Description
https://github.com/mookjp/pool/blob/master/docker/pool/build-screen/app/scripts/main.js#L1-L16
(function () {
showCommitId();
var es = new EventSource("/build/" + getCommitId());
es.addEventListener("build_log", function(event){
$(".log-console").append("\n" + event.data);
$(".log-console").animate(
{ scrollTop:
$(".log-console")[0].scrollHeight - $(".log-console").height()
},
50);
});
es.addEventListener("build_finished", function(event){
document.location.reload();
});
})();As $(".log-console") was created every time in call of event, it may make client slow.
Reactions are currently unavailable