From c972978b43b943a1ad8709992d080bedbbe12ae2 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 17 Dec 2014 16:44:47 +0000 Subject: Add comment re. Math.sign(). --- content_scripts/scroller.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content_scripts') diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 09470158..2f69fc7d 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -5,6 +5,10 @@ activatedElement = null # Return 0, -1 or 1: the sign of the argument. +# NOTE(smblott; 2014/12/17) We would like to use Math.sign(). However, according to this site +# (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign) Math.sign() was +# only introduced in Chrome 38. This caused problems in R1.48 for users with old Chrome installations. We +# can replace this with Math.sign() at some point. getSign = (val) -> if not val 0 -- cgit v1.2.3