You can do it by using dataset
for storing the click state,
document.querySelector("button[name='showAllBtn']").addEventListener("click",function(){
var state = this.dataset.clicked;
state = state || true;
((state) ? showAllSteps : nextStep)();
this.dataset.clicked = !state;
},false);
Edit: True
/false
seems to cause some problem with the above code. Hence I have made some tweak above and given it below.
document.querySelector("button[name='showAllBtn']").addEventListener("click",function(){
var state = this.dataset.clicked;
state = typeof state == "undefined" ? "Y" : state;
((state == "Y") ? showAllSteps : nextStep)();
this.dataset.clicked = (state == "Y") ? "N" : "Y";
},false);