You can add and remove tasks. Enter multiple tasks at once by separating them with a comma. A resettable counter shows how many tasks have been added and the total amount of tasks.
t="button";HTMLElement.prototype.c=function(n){e=document.createElement(n);this.appendChild(e);return e};s=localStorage;i=b.c("input");a=b.c(t);r=b.c(t);l=b.c("div");b.c("style").innerText="canvas{display:none}*{font-family:sans-serif}b{color:red}";function R(){v=i.value.replace(/ *, */,"|");l.innerHTML=s.x+"/"+s.a+" tasks done<br>";s.s.split(",").splice(1).filter(function(e){if(i.value&&e.search(v)>-1)return e;}).forEach(function(e){l.innerHTML+="<"+t+" onclick='s.s=s.s.replace(\","+e+"\",\"\");s.x=s.x*1+1;R()'>x</"+t+"> "+e.replace(new RegExp("("+v+")","g"),"<b>$1</b>")+"<br>";})};i.type="search";i.placeholder="enter or search task";i.onkeyup=R;a.innerText="add";a.onclick=i.onsearch=function(){s.s+=","+i.value.trim().replace(/ *, */,",");R();if(i.value)s.a=s.a*1+1};r.innerText="reset counter";r.onclick=function(){s.x=0;s.a=(s.s.match(/,[^,]/g)||[]).length;R()};if(!s.s)s.s="";if(!s.a)s.a=s.x=0;R()
dD0iYnV0dG9uIjtIVE1MRWxlbWVudC5wcm90b3R5cGUuYz1mdW5jdGlvbihuKXtlPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQobik7dGhpcy5hcHBlbmRDaGlsZChlKTtyZXR1cm4gZX07cz1sb2NhbFN0b3JhZ2U7aT1iLmMoImlucHV0Iik7YT1iLmModCk7cj1iLmModCk7bD1iLmMoImRpdiIpO2IuYygic3R5bGUiKS5pbm5lclRleHQ9ImNhbnZhc3tkaXNwbGF5Om5vbmV9Kntmb250LWZhbWlseTpzYW5zLXNlcmlmfWJ7Y29sb3I6cmVkfSI7ZnVuY3Rpb24gUigpe3Y9aS52YWx1ZS5yZXBsYWNlKC8gKiwgKi8sInwiKTtsLmlubmVySFRNTD1zLngrIi8iK3MuYSsiIHRhc2tzIGRvbmU8YnI+IjtzLnMuc3BsaXQoIiwiKS5zcGxpY2UoMSkuZmlsdGVyKGZ1bmN0aW9uKGUpe2lmKGkudmFsdWUmJmUuc2VhcmNoKHYpPi0xKXJldHVybiBlO30pLmZvckVhY2goZnVuY3Rpb24oZSl7bC5pbm5lckhUTUwrPSI8Iit0KyIgb25jbGljaz0ncy5zPXMucy5yZXBsYWNlKFwiLCIrZSsiXCIsXCJcIik7cy54PXMueCoxKzE7UigpJz54PC8iK3QrIj4gIitlLnJlcGxhY2UobmV3IFJlZ0V4cCgiKCIrdisiKSIsImciKSwiPGI+JDE8L2I+IikrIjxicj4iO30pfTtpLnR5cGU9InNlYXJjaCI7aS5wbGFjZWhvbGRlcj0iZW50ZXIgb3Igc2VhcmNoIHRhc2siO2kub25rZXl1cD1SO2EuaW5uZXJUZXh0PSJhZGQiO2Eub25jbGljaz1pLm9uc2VhcmNoPWZ1bmN0aW9uKCl7cy5zKz0iLCIraS52YWx1ZS50cmltKCkucmVwbGFjZSgvICosICovLCIsIik7UigpO2lmKGkudmFsdWUpcy5hPXMuYSoxKzF9O3IuaW5uZXJUZXh0PSJyZXNldCBjb3VudGVyIjtyLm9uY2xpY2s9ZnVuY3Rpb24oKXtzLng9MDtzLmE9KHMucy5tYXRjaCgvLFteLF0vZyl8fFtdKS5sZW5ndGg7UigpfTtpZighcy5zKXMucz0iIjtpZighcy5hKXMuYT1zLng9MDtSKCk=
//set constant
t="button";
//add create function to every HTMLElement
HTMLElement.prototype.c=function(n){
e=document.createElement(n);
this.appendChild(e);
return e
}
//shorten localStorage and create UI elements
s=localStorage;
i=b.c("input");
a=b.c(t);
r=b.c(t);
l=b.c("div");
b.c("style").innerText="canvas{display:none}*{font-family:sans-serif}b{color:red}";
//refresh search results
function R(){
v=i.value.replace(/ *, */,"|");
l.innerHTML=s.x+"/"+s.a+" tasks done<br>";
s.s.split(",").splice(1).filter(function(e){
if(i.value&&e.search(v)>-1)return e;
}).forEach(function(e){
l.innerHTML+="<"+t+" onclick='s.s=s.s.replace(\","+e+"\",\"\");s.x=s.x*1+1;R()'>x</"+t+"> "+e.replace(new RegExp("("+v+")","g"),"<b>$1</b>")+"<br>";
})
}
//set attributes for search box
i.type="search";
i.placeholder="enter or search task";
i.onkeyup=R;
//set attributes for add button
a.innerText="add";
a.onclick=i.onsearch=function(){
s.s+=","+i.value.trim().replace(/ *, */,",");
R();
if(i.value)s.a=s.a*1+1
}
//set attributes for reset button
r.innerText="reset counter";
r.onclick=function(){
s.x=0;
s.a=(s.s.match(/,[^,]/g)||[]).length;
R()
}
//initialization
if(!s.s)s.s="";
if(!s.a)s.a=s.x=0;
R()