Skip to content

Commit 0cbb24d

Browse files
committed
Updated to use var again
1 parent bceb7da commit 0cbb24d

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

dist/jquery.requestAnimationFrame.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
/*! jQuery requestAnimationFrame - v0.0.0 - 2012-08-09
1+
/*! jQuery requestAnimationFrame - v0.0.0 - 2012-08-11
22
* https://github.com/gnarf37/jquery-requestAnimationFrame
33
* Copyright (c) 2012 Corey Frang; Licensed MIT */
44

55
(function( $ ) {
66

7-
// FireFox apparently doesn't like using this from a variable...
8-
window.requestAnimationFrame = window.requestAnimationFrame ||
9-
window.webkitRequestAnimationFrame ||
10-
window.mozRequestAnimationFrame ||
11-
window.oRequestAnimationFrame ||
12-
window.msRequestAnimationFrame;
13-
14-
var animating;
7+
var animating,
8+
requestAnimationFrame = window.requestAnimationFrame ||
9+
window.webkitRequestAnimationFrame ||
10+
window.mozRequestAnimationFrame ||
11+
window.oRequestAnimationFrame ||
12+
window.msRequestAnimationFrame;
1513

1614
function raf() {
1715
if ( animating ) {
18-
window.requestAnimationFrame( raf );
16+
requestAnimationFrame( raf );
1917
jQuery.fx.tick();
2018
}
2119
}
2220

23-
if ( window.requestAnimationFrame ) {
21+
if ( requestAnimationFrame ) {
2422

2523
jQuery.fx.timer = function( timer ) {
2624
if ( timer() && jQuery.timers.push( timer ) && !animating ) {

dist/jquery.requestAnimationFrame.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

grunt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = function(grunt) {
33

44
// Project configuration.
55
grunt.initConfig({
6-
pkg: '<json:package.json>',
6+
pkg: '<json:requestAnimationFrame.jquery.json>',
77
meta: {
88
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
99
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +

src/jquery.requestAnimationFrame.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,21 @@
99

1010
(function( $ ) {
1111

12-
// FireFox apparently doesn't like using this from a variable...
13-
window.requestAnimationFrame = window.requestAnimationFrame ||
14-
window.webkitRequestAnimationFrame ||
15-
window.mozRequestAnimationFrame ||
16-
window.oRequestAnimationFrame ||
17-
window.msRequestAnimationFrame;
18-
19-
var animating;
12+
var animating,
13+
requestAnimationFrame = window.requestAnimationFrame ||
14+
window.webkitRequestAnimationFrame ||
15+
window.mozRequestAnimationFrame ||
16+
window.oRequestAnimationFrame ||
17+
window.msRequestAnimationFrame;
2018

2119
function raf() {
2220
if ( animating ) {
23-
window.requestAnimationFrame( raf );
21+
requestAnimationFrame( raf );
2422
jQuery.fx.tick();
2523
}
2624
}
2725

28-
if ( window.requestAnimationFrame ) {
26+
if ( requestAnimationFrame ) {
2927

3028
jQuery.fx.timer = function( timer ) {
3129
if ( timer() && jQuery.timers.push( timer ) && !animating ) {

0 commit comments

Comments
 (0)