- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
if(!count)
count=0;
switch(type){
case 'writing':
count++;
break;
case 'stopWriting':
count--;
break;
default:
return;
}
//Shit happens.
if(count<0)
count=0;
Тадам та да дадам!