From 940b8790551204508e4cfcc72d0e08c053382a67 Mon Sep 17 00:00:00 2001 From: rsesek Date: Thu, 15 Mar 2007 00:01:41 +0000 Subject: [PATCH] In RGB triads, don't force the parentheses to be there; just allow three comma-separated integers git-svn-id: svn://depot/macosx/RGBConverter/trunk@622 ad1dcce9-c9fe-0310-b82b-83ea1733dbb0 --- RGB Converter.wdgt/Widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGB Converter.wdgt/Widget.js b/RGB Converter.wdgt/Widget.js index 3319f34..471f84b 100644 --- a/RGB Converter.wdgt/Widget.js +++ b/RGB Converter.wdgt/Widget.js @@ -40,7 +40,7 @@ function rgbwatcher(colour) field = document.getElementById(colour + "inputf"); // handle RGB triads - if (triad = field.value.match(/(rgb)?\(([0-9]{1,3}),\s?([0-9]{1,3}),\s?([0-9]{1,3})\)/)) + if (triad = field.value.match(/(rgb)?\(?([0-9]{1,3}),\s?([0-9]{1,3}),\s?([0-9]{1,3})\)?/)) { document.getElementById("redinputf").value = triad[2]; document.getElementById("greeninputf").value = triad[3]; -- 2.43.5