1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,46 +0,0 @@ |
1 |
-/*! |
|
2 |
-Waypoints Debug - 3.1.1 |
|
3 |
-Copyright © 2011-2015 Caleb Troughton |
|
4 |
-Licensed under the MIT license. |
|
5 |
-https://github.com/imakewebthings/waypoints/blog/master/licenses.txt |
|
6 |
-*/ |
|
7 |
-(function() { |
|
8 |
- 'use strict' |
|
9 |
- |
|
10 |
- var displayNoneMessage = [ |
|
11 |
- 'You have a Waypoint element with display none. For more information on ', |
|
12 |
- 'why this is a bad idea read ', |
|
13 |
- 'http://imakewebthings.com/waypoints/guides/debugging/#display-none' |
|
14 |
- ].join('') |
|
15 |
- var fixedMessage = [ |
|
16 |
- 'You have a Waypoint element with fixed positioning. For more ', |
|
17 |
- 'information on why this is a bad idea read ', |
|
18 |
- 'http://imakewebthings.com/waypoints/guides/debugging/#fixed-position' |
|
19 |
- ].join('') |
|
20 |
- |
|
21 |
- function checkWaypointStyles() { |
|
22 |
- var originalRefresh = window.Waypoint.Context.prototype.refresh |
|
23 |
- |
|
24 |
- window.Waypoint.Context.prototype.refresh = function() { |
|
25 |
- for (var axis in this.waypoints) { |
|
26 |
- for (var key in this.waypoints[axis]) { |
|
27 |
- var waypoint = this.waypoints[axis][key] |
|
28 |
- var style = window.getComputedStyle(waypoint.element) |
|
29 |
- if (!waypoint.enabled) { |
|
30 |
- continue |
|
31 |
- } |
|
32 |
- if (style && style.display === 'none') { |
|
33 |
- console.error(displayNoneMessage) |
|
34 |
- } |
|
35 |
- if (style && style.position === 'fixed') { |
|
36 |
- console.error(fixedMessage) |
|
37 |
- } |
|
38 |
- } |
|
39 |
- } |
|
40 |
- return originalRefresh.call(this) |
|
41 |
- } |
|
42 |
- } |
|
43 |
- |
|
44 |
- checkWaypointStyles() |
|
45 |
-}()) |
|
46 |
-; |
|
47 | 0 |
\ No newline at end of file |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,46 @@ |
1 |
+/*! |
|
2 |
+Waypoints Debug - 3.1.1 |
|
3 |
+Copyright © 2011-2015 Caleb Troughton |
|
4 |
+Licensed under the MIT license. |
|
5 |
+https://github.com/imakewebthings/waypoints/blog/master/licenses.txt |
|
6 |
+*/ |
|
7 |
+(function() { |
|
8 |
+ 'use strict' |
|
9 |
+ |
|
10 |
+ var displayNoneMessage = [ |
|
11 |
+ 'You have a Waypoint element with display none. For more information on ', |
|
12 |
+ 'why this is a bad idea read ', |
|
13 |
+ 'http://imakewebthings.com/waypoints/guides/debugging/#display-none' |
|
14 |
+ ].join('') |
|
15 |
+ var fixedMessage = [ |
|
16 |
+ 'You have a Waypoint element with fixed positioning. For more ', |
|
17 |
+ 'information on why this is a bad idea read ', |
|
18 |
+ 'http://imakewebthings.com/waypoints/guides/debugging/#fixed-position' |
|
19 |
+ ].join('') |
|
20 |
+ |
|
21 |
+ function checkWaypointStyles() { |
|
22 |
+ var originalRefresh = window.Waypoint.Context.prototype.refresh |
|
23 |
+ |
|
24 |
+ window.Waypoint.Context.prototype.refresh = function() { |
|
25 |
+ for (var axis in this.waypoints) { |
|
26 |
+ for (var key in this.waypoints[axis]) { |
|
27 |
+ var waypoint = this.waypoints[axis][key] |
|
28 |
+ var style = window.getComputedStyle(waypoint.element) |
|
29 |
+ if (!waypoint.enabled) { |
|
30 |
+ continue |
|
31 |
+ } |
|
32 |
+ if (style && style.display === 'none') { |
|
33 |
+ console.error(displayNoneMessage) |
|
34 |
+ } |
|
35 |
+ if (style && style.position === 'fixed') { |
|
36 |
+ console.error(fixedMessage) |
|
37 |
+ } |
|
38 |
+ } |
|
39 |
+ } |
|
40 |
+ return originalRefresh.call(this) |
|
41 |
+ } |
|
42 |
+ } |
|
43 |
+ |
|
44 |
+ checkWaypointStyles() |
|
45 |
+}()) |
|
46 |
+; |
|
0 | 47 |
\ No newline at end of file |