Don't let scores drop below 0
This commit is contained in:
parent
909a11f9fa
commit
4da3624942
|
@ -4,7 +4,7 @@
|
||||||
"short_name": "__MSG_appShortName__",
|
"short_name": "__MSG_appShortName__",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"author": "Neale Pickett <neale@woozle.org>",
|
"author": "Neale Pickett <neale@woozle.org>",
|
||||||
"version": "6.2",
|
"version": "6.2.1",
|
||||||
"app": {
|
"app": {
|
||||||
"background": {
|
"background": {
|
||||||
"scripts": ["res/background.js"]
|
"scripts": ["res/background.js"]
|
||||||
|
|
|
@ -271,7 +271,7 @@ function score(team, points) {
|
||||||
var te = e("score-" + team);
|
var te = e("score-" + team);
|
||||||
var ts = Number(te.innerHTML);
|
var ts = Number(te.innerHTML);
|
||||||
|
|
||||||
ts += points;
|
ts = Math.max(ts + points, 0);
|
||||||
te.innerHTML = ts;
|
te.innerHTML = ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue