From 4da362494246dbd67a94929d56a9084efc136b93 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 6 Feb 2014 20:12:56 -0700 Subject: [PATCH] Don't let scores drop below 0 --- manifest.json | 2 +- res/scoreboard.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 7b75d04..98e1ab5 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "short_name": "__MSG_appShortName__", "description": "__MSG_appDesc__", "author": "Neale Pickett ", - "version": "6.2", + "version": "6.2.1", "app": { "background": { "scripts": ["res/background.js"] diff --git a/res/scoreboard.js b/res/scoreboard.js index 070c31b..434d076 100644 --- a/res/scoreboard.js +++ b/res/scoreboard.js @@ -271,7 +271,7 @@ function score(team, points) { var te = e("score-" + team); var ts = Number(te.innerHTML); - ts += points; + ts = Math.max(ts + points, 0); te.innerHTML = ts; }