make this work with pre-23 versions of Gecko by supporting mozRequestAnimationFrame
authorRobert Kaiser <kairo@kairo.at>
Fri, 28 Mar 2014 21:25:28 +0000 (22:25 +0100)
committerRobert Kaiser <kairo@kairo.at>
Fri, 28 Mar 2014 21:25:28 +0000 (22:25 +0100)
js/ui.js

index 650b9cee6a36ae904bc358d2265ed0cbd60e82a5..c2f64af6871f19ef2aa58580807a733e8163e1ac 100644 (file)
--- a/js/ui.js
+++ b/js/ui.js
@@ -2,10 +2,11 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-// Get the best-available indexedDB object.
+// Get the best-available objects for indexedDB and requestAnimationFrame.
 window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
-var mainDB;
+window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
 
+var mainDB;
 var gUIHideCountdown = 0;
 var gWaitCounter = 0;
 var gAction, gActionLabel;