scrolltojs-rails 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scrolltojs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/{con_theme.js → landing.js} +0 -0
- data/vendor/assets/javascripts/third_landing_page/common.js +468 -0
- data/vendor/assets/javascripts/third_landing_page/jwplayer.flash.swf +0 -0
- data/vendor/assets/javascripts/third_landing_page/jwplayer.html5.js +258 -0
- data/vendor/assets/javascripts/third_landing_page/jwplayer.js +138 -0
- data/vendor/assets/javascripts/third_landing_page/main.js +669 -0
- data/vendor/assets/javascripts/third_landing_page/owl.carousel.min.js +47 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/bootstrap.min.js +7 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/detectmobilebrowser.js +7 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/gmaps.js +2149 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/html5shiv.js +301 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/isotope.pkgd.min.js +8 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery-1.10.2.min.js +6 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.ajaxchimp.min.js +1 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.counterup.min.js +8 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.easing.1.3.js +205 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.fitvids.js +83 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.nicescroll.min.js +114 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.stellar.js +660 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.timeago.js +214 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/jquery.tubular.1.0.js +148 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/matchMedia.js +46 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/materialize.min.js +10 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/owl.carousel.min.js +47 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/tweetie.js +142 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/waypoints.js +8 -0
- data/vendor/assets/javascripts/third_landing_page/vendor/wow.min.js +2 -0
- data/vendor/assets/stylesheets/third_landing_page/animate.min.css +6 -0
- data/vendor/assets/stylesheets/third_landing_page/blog-single.css +657 -0
- data/vendor/assets/stylesheets/third_landing_page/blog.css +168 -0
- data/vendor/assets/stylesheets/third_landing_page/bootstrap.min.css +10 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color1.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color2.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color3.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color4.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color5.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color6.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color7.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/colors/color8.css +164 -0
- data/vendor/assets/stylesheets/third_landing_page/ionicons.min.css +11 -0
- data/vendor/assets/stylesheets/third_landing_page/main.css +2500 -0
- data/vendor/assets/stylesheets/third_landing_page/owl.carousel.css +71 -0
- data/vendor/assets/stylesheets/third_landing_page/owl.theme.css +79 -0
- data/vendor/assets/stylesheets/third_landing_page/owl.transitions.css +163 -0
- data/vendor/assets/stylesheets/third_landing_page/responsive.css +856 -0
- metadata +47 -8
- data/vendor/assets/javascripts/con_theme/_con.min.js +0 -11
- data/vendor/assets/javascripts/con_theme/materialize.min.js +0 -10
- data/vendor/assets/javascripts/con_theme/nanoscroller.min.js +0 -16
- data/vendor/assets/javascripts/con_theme/requestAnimationFrame.min.js +0 -4
- data/vendor/assets/javascripts/con_theme/sortable.min.js +0 -2
@@ -0,0 +1,214 @@
|
|
1
|
+
/**
|
2
|
+
* Timeago is a jQuery plugin that makes it easy to support automatically
|
3
|
+
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
4
|
+
*
|
5
|
+
* @name timeago
|
6
|
+
* @version 1.4.1
|
7
|
+
* @requires jQuery v1.2.3+
|
8
|
+
* @author Ryan McGeary
|
9
|
+
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
10
|
+
*
|
11
|
+
* For usage and examples, visit:
|
12
|
+
* http://timeago.yarp.com/
|
13
|
+
*
|
14
|
+
* Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
15
|
+
*/
|
16
|
+
|
17
|
+
(function (factory) {
|
18
|
+
if (typeof define === 'function' && define.amd) {
|
19
|
+
// AMD. Register as an anonymous module.
|
20
|
+
define(['jquery'], factory);
|
21
|
+
} else {
|
22
|
+
// Browser globals
|
23
|
+
factory(jQuery);
|
24
|
+
}
|
25
|
+
}(function ($) {
|
26
|
+
$.timeago = function(timestamp) {
|
27
|
+
if (timestamp instanceof Date) {
|
28
|
+
return inWords(timestamp);
|
29
|
+
} else if (typeof timestamp === "string") {
|
30
|
+
return inWords($.timeago.parse(timestamp));
|
31
|
+
} else if (typeof timestamp === "number") {
|
32
|
+
return inWords(new Date(timestamp));
|
33
|
+
} else {
|
34
|
+
return inWords($.timeago.datetime(timestamp));
|
35
|
+
}
|
36
|
+
};
|
37
|
+
var $t = $.timeago;
|
38
|
+
|
39
|
+
$.extend($.timeago, {
|
40
|
+
settings: {
|
41
|
+
refreshMillis: 60000,
|
42
|
+
allowPast: true,
|
43
|
+
allowFuture: false,
|
44
|
+
localeTitle: false,
|
45
|
+
cutoff: 0,
|
46
|
+
strings: {
|
47
|
+
prefixAgo: null,
|
48
|
+
prefixFromNow: null,
|
49
|
+
suffixAgo: "ago",
|
50
|
+
suffixFromNow: "from now",
|
51
|
+
inPast: 'any moment now',
|
52
|
+
seconds: "less than a minute",
|
53
|
+
minute: "about a minute",
|
54
|
+
minutes: "%d minutes",
|
55
|
+
hour: "about an hour",
|
56
|
+
hours: "about %d hours",
|
57
|
+
day: "a day",
|
58
|
+
days: "%d days",
|
59
|
+
month: "about a month",
|
60
|
+
months: "%d months",
|
61
|
+
year: "about a year",
|
62
|
+
years: "%d years",
|
63
|
+
wordSeparator: " ",
|
64
|
+
numbers: []
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
inWords: function(distanceMillis) {
|
69
|
+
if(!this.settings.allowPast && ! this.settings.allowFuture) {
|
70
|
+
throw 'timeago allowPast and allowFuture settings can not both be set to false.';
|
71
|
+
}
|
72
|
+
|
73
|
+
var $l = this.settings.strings;
|
74
|
+
var prefix = $l.prefixAgo;
|
75
|
+
var suffix = $l.suffixAgo;
|
76
|
+
if (this.settings.allowFuture) {
|
77
|
+
if (distanceMillis < 0) {
|
78
|
+
prefix = $l.prefixFromNow;
|
79
|
+
suffix = $l.suffixFromNow;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
if(!this.settings.allowPast && distanceMillis >= 0) {
|
84
|
+
return this.settings.strings.inPast;
|
85
|
+
}
|
86
|
+
|
87
|
+
var seconds = Math.abs(distanceMillis) / 1000;
|
88
|
+
var minutes = seconds / 60;
|
89
|
+
var hours = minutes / 60;
|
90
|
+
var days = hours / 24;
|
91
|
+
var years = days / 365;
|
92
|
+
|
93
|
+
function substitute(stringOrFunction, number) {
|
94
|
+
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
|
95
|
+
var value = ($l.numbers && $l.numbers[number]) || number;
|
96
|
+
return string.replace(/%d/i, value);
|
97
|
+
}
|
98
|
+
|
99
|
+
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
|
100
|
+
seconds < 90 && substitute($l.minute, 1) ||
|
101
|
+
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
|
102
|
+
minutes < 90 && substitute($l.hour, 1) ||
|
103
|
+
hours < 24 && substitute($l.hours, Math.round(hours)) ||
|
104
|
+
hours < 42 && substitute($l.day, 1) ||
|
105
|
+
days < 30 && substitute($l.days, Math.round(days)) ||
|
106
|
+
days < 45 && substitute($l.month, 1) ||
|
107
|
+
days < 365 && substitute($l.months, Math.round(days / 30)) ||
|
108
|
+
years < 1.5 && substitute($l.year, 1) ||
|
109
|
+
substitute($l.years, Math.round(years));
|
110
|
+
|
111
|
+
var separator = $l.wordSeparator || "";
|
112
|
+
if ($l.wordSeparator === undefined) { separator = " "; }
|
113
|
+
return $.trim([prefix, words, suffix].join(separator));
|
114
|
+
},
|
115
|
+
|
116
|
+
parse: function(iso8601) {
|
117
|
+
var s = $.trim(iso8601);
|
118
|
+
s = s.replace(/\.\d+/,""); // remove milliseconds
|
119
|
+
s = s.replace(/-/,"/").replace(/-/,"/");
|
120
|
+
s = s.replace(/T/," ").replace(/Z/," UTC");
|
121
|
+
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
|
122
|
+
s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
|
123
|
+
return new Date(s);
|
124
|
+
},
|
125
|
+
datetime: function(elem) {
|
126
|
+
var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
|
127
|
+
return $t.parse(iso8601);
|
128
|
+
},
|
129
|
+
isTime: function(elem) {
|
130
|
+
// jQuery's `is()` doesn't play well with HTML5 in IE
|
131
|
+
return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
|
132
|
+
}
|
133
|
+
});
|
134
|
+
|
135
|
+
// functions that can be called via $(el).timeago('action')
|
136
|
+
// init is default when no action is given
|
137
|
+
// functions are called with context of a single element
|
138
|
+
var functions = {
|
139
|
+
init: function(){
|
140
|
+
var refresh_el = $.proxy(refresh, this);
|
141
|
+
refresh_el();
|
142
|
+
var $s = $t.settings;
|
143
|
+
if ($s.refreshMillis > 0) {
|
144
|
+
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
|
145
|
+
}
|
146
|
+
},
|
147
|
+
update: function(time){
|
148
|
+
var parsedTime = $t.parse(time);
|
149
|
+
$(this).data('timeago', { datetime: parsedTime });
|
150
|
+
if($t.settings.localeTitle) $(this).attr("title", parsedTime.toLocaleString());
|
151
|
+
refresh.apply(this);
|
152
|
+
},
|
153
|
+
updateFromDOM: function(){
|
154
|
+
$(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
|
155
|
+
refresh.apply(this);
|
156
|
+
},
|
157
|
+
dispose: function () {
|
158
|
+
if (this._timeagoInterval) {
|
159
|
+
window.clearInterval(this._timeagoInterval);
|
160
|
+
this._timeagoInterval = null;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
};
|
164
|
+
|
165
|
+
$.fn.timeago = function(action, options) {
|
166
|
+
var fn = action ? functions[action] : functions.init;
|
167
|
+
if(!fn){
|
168
|
+
throw new Error("Unknown function name '"+ action +"' for timeago");
|
169
|
+
}
|
170
|
+
// each over objects here and call the requested function
|
171
|
+
this.each(function(){
|
172
|
+
fn.call(this, options);
|
173
|
+
});
|
174
|
+
return this;
|
175
|
+
};
|
176
|
+
|
177
|
+
function refresh() {
|
178
|
+
var data = prepareData(this);
|
179
|
+
var $s = $t.settings;
|
180
|
+
|
181
|
+
if (!isNaN(data.datetime)) {
|
182
|
+
if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
|
183
|
+
$(this).text(inWords(data.datetime));
|
184
|
+
}
|
185
|
+
}
|
186
|
+
return this;
|
187
|
+
}
|
188
|
+
|
189
|
+
function prepareData(element) {
|
190
|
+
element = $(element);
|
191
|
+
if (!element.data("timeago")) {
|
192
|
+
element.data("timeago", { datetime: $t.datetime(element) });
|
193
|
+
var text = $.trim(element.text());
|
194
|
+
if ($t.settings.localeTitle) {
|
195
|
+
element.attr("title", element.data('timeago').datetime.toLocaleString());
|
196
|
+
} else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
|
197
|
+
element.attr("title", text);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
return element.data("timeago");
|
201
|
+
}
|
202
|
+
|
203
|
+
function inWords(date) {
|
204
|
+
return $t.inWords(distance(date));
|
205
|
+
}
|
206
|
+
|
207
|
+
function distance(date) {
|
208
|
+
return (new Date().getTime() - date.getTime());
|
209
|
+
}
|
210
|
+
|
211
|
+
// fix for IE6 suckage
|
212
|
+
document.createElement("abbr");
|
213
|
+
document.createElement("time");
|
214
|
+
}));
|
@@ -0,0 +1,148 @@
|
|
1
|
+
/* jQuery tubular plugin
|
2
|
+
|* by Sean McCambridge
|
3
|
+
|* http://www.seanmccambridge.com/tubular
|
4
|
+
|* version: 1.0
|
5
|
+
|* updated: October 1, 2012
|
6
|
+
|* since 2010
|
7
|
+
|* licensed under the MIT License
|
8
|
+
|* Enjoy.
|
9
|
+
|*
|
10
|
+
|* Thanks,
|
11
|
+
|* Sean */
|
12
|
+
|
13
|
+
;(function ($, window) {
|
14
|
+
|
15
|
+
// test for feature support and return if failure
|
16
|
+
|
17
|
+
// defaults
|
18
|
+
var defaults = {
|
19
|
+
ratio: 16/9, // usually either 4/3 or 16/9 -- tweak as needed
|
20
|
+
videoId: 'ZCAnLxRvNNc', // toy robot in space is a good default, no?
|
21
|
+
mute: true,
|
22
|
+
repeat: true,
|
23
|
+
width: $(window).width(),
|
24
|
+
wrapperZIndex: 99,
|
25
|
+
playButtonClass: 'tubular-play',
|
26
|
+
pauseButtonClass: 'tubular-pause',
|
27
|
+
muteButtonClass: 'tubular-mute',
|
28
|
+
volumeUpClass: 'tubular-volume-up',
|
29
|
+
volumeDownClass: 'tubular-volume-down',
|
30
|
+
increaseVolumeBy: 10,
|
31
|
+
start: 0
|
32
|
+
};
|
33
|
+
|
34
|
+
// methods
|
35
|
+
|
36
|
+
var tubular = function(node, options) { // should be called on the wrapper div
|
37
|
+
var options = $.extend({}, defaults, options),
|
38
|
+
$body = $('body') // cache body node
|
39
|
+
$node = $(node); // cache wrapper node
|
40
|
+
|
41
|
+
// build container
|
42
|
+
var tubularContainer = '<div id="tubular-container" style="overflow: hidden; position: fixed; z-index: 1; width: 100%; height: 100%"><div id="tubular-player" style="position: absolute"></div></div><div id="tubular-shield" style="width: 100%; height: 100%; z-index: 2; position: absolute; left: 0; top: 0;"></div>';
|
43
|
+
|
44
|
+
// set up css prereq's, inject tubular container and set up wrapper defaults
|
45
|
+
$('html,body').css({'width': '100%', 'height': '100%'});
|
46
|
+
$body.prepend(tubularContainer);
|
47
|
+
$node.css({position: 'relative', 'z-index': options.wrapperZIndex});
|
48
|
+
|
49
|
+
// set up iframe player, use global scope so YT api can talk
|
50
|
+
window.player;
|
51
|
+
window.onYouTubeIframeAPIReady = function() {
|
52
|
+
player = new YT.Player('tubular-player', {
|
53
|
+
width: options.width,
|
54
|
+
height: Math.ceil(options.width / options.ratio),
|
55
|
+
videoId: options.videoId,
|
56
|
+
playerVars: {
|
57
|
+
controls: 0,
|
58
|
+
showinfo: 0,
|
59
|
+
modestbranding: 1,
|
60
|
+
wmode: 'transparent'
|
61
|
+
},
|
62
|
+
events: {
|
63
|
+
'onReady': onPlayerReady,
|
64
|
+
'onStateChange': onPlayerStateChange
|
65
|
+
}
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
window.onPlayerReady = function(e) {
|
70
|
+
resize();
|
71
|
+
if (options.mute) e.target.mute();
|
72
|
+
e.target.seekTo(options.start);
|
73
|
+
e.target.playVideo();
|
74
|
+
}
|
75
|
+
|
76
|
+
window.onPlayerStateChange = function(state) {
|
77
|
+
if (state.data === 0 && options.repeat) { // video ended and repeat option is set true
|
78
|
+
player.seekTo(options.start); // restart
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
// resize handler updates width, height and offset of player after resize/init
|
83
|
+
var resize = function() {
|
84
|
+
var width = $(window).width(),
|
85
|
+
pWidth, // player width, to be defined
|
86
|
+
height = $(window).height(),
|
87
|
+
pHeight, // player height, tbd
|
88
|
+
$tubularPlayer = $('#tubular-player');
|
89
|
+
|
90
|
+
// when screen aspect ratio differs from video, video must center and underlay one dimension
|
91
|
+
|
92
|
+
if (width / options.ratio < height) { // if new video height < window height (gap underneath)
|
93
|
+
pWidth = Math.ceil(height * options.ratio); // get new player width
|
94
|
+
$tubularPlayer.width(pWidth).height(height).css({left: (width - pWidth) / 2, top: 0}); // player width is greater, offset left; reset top
|
95
|
+
} else { // new video width < window width (gap to right)
|
96
|
+
pHeight = Math.ceil(width / options.ratio); // get new player height
|
97
|
+
$tubularPlayer.width(width).height(pHeight).css({left: 0, top: (height - pHeight) / 2}); // player height is greater, offset top; reset left
|
98
|
+
}
|
99
|
+
|
100
|
+
}
|
101
|
+
|
102
|
+
// events
|
103
|
+
$(window).on('resize.tubular', function() {
|
104
|
+
resize();
|
105
|
+
})
|
106
|
+
|
107
|
+
$('body').on('click','.' + options.playButtonClass, function(e) { // play button
|
108
|
+
e.preventDefault();
|
109
|
+
player.playVideo();
|
110
|
+
}).on('click', '.' + options.pauseButtonClass, function(e) { // pause button
|
111
|
+
e.preventDefault();
|
112
|
+
player.pauseVideo();
|
113
|
+
}).on('click', '.' + options.muteButtonClass, function(e) { // mute button
|
114
|
+
e.preventDefault();
|
115
|
+
(player.isMuted()) ? player.unMute() : player.mute();
|
116
|
+
}).on('click', '.' + options.volumeDownClass, function(e) { // volume down button
|
117
|
+
e.preventDefault();
|
118
|
+
var currentVolume = player.getVolume();
|
119
|
+
if (currentVolume < options.increaseVolumeBy) currentVolume = options.increaseVolumeBy;
|
120
|
+
player.setVolume(currentVolume - options.increaseVolumeBy);
|
121
|
+
}).on('click', '.' + options.volumeUpClass, function(e) { // volume up button
|
122
|
+
e.preventDefault();
|
123
|
+
if (player.isMuted()) player.unMute(); // if mute is on, unmute
|
124
|
+
var currentVolume = player.getVolume();
|
125
|
+
if (currentVolume > 100 - options.increaseVolumeBy) currentVolume = 100 - options.increaseVolumeBy;
|
126
|
+
player.setVolume(currentVolume + options.increaseVolumeBy);
|
127
|
+
})
|
128
|
+
}
|
129
|
+
|
130
|
+
// load yt iframe js api
|
131
|
+
|
132
|
+
var tag = document.createElement('script');
|
133
|
+
tag.src = "//www.youtube.com/iframe_api";
|
134
|
+
var firstScriptTag = document.getElementsByTagName('script')[0];
|
135
|
+
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
136
|
+
|
137
|
+
// create plugin
|
138
|
+
|
139
|
+
$.fn.tubular = function (options) {
|
140
|
+
return this.each(function () {
|
141
|
+
if (!$.data(this, 'tubular_instantiated')) { // let's only run one
|
142
|
+
$.data(this, 'tubular_instantiated',
|
143
|
+
tubular(this, options));
|
144
|
+
}
|
145
|
+
});
|
146
|
+
}
|
147
|
+
|
148
|
+
})(jQuery, window);
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
|
2
|
+
|
3
|
+
window.matchMedia || (window.matchMedia = function() {
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
// For browsers that support matchMedium api such as IE 9 and webkit
|
7
|
+
var styleMedia = (window.styleMedia || window.media);
|
8
|
+
|
9
|
+
// For those that don't support matchMedium
|
10
|
+
if (!styleMedia) {
|
11
|
+
var style = document.createElement('style'),
|
12
|
+
script = document.getElementsByTagName('script')[0],
|
13
|
+
info = null;
|
14
|
+
|
15
|
+
style.type = 'text/css';
|
16
|
+
style.id = 'matchmediajs-test';
|
17
|
+
|
18
|
+
script.parentNode.insertBefore(style, script);
|
19
|
+
|
20
|
+
// 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
|
21
|
+
info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
|
22
|
+
|
23
|
+
styleMedia = {
|
24
|
+
matchMedium: function(media) {
|
25
|
+
var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
|
26
|
+
|
27
|
+
// 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
|
28
|
+
if (style.styleSheet) {
|
29
|
+
style.styleSheet.cssText = text;
|
30
|
+
} else {
|
31
|
+
style.textContent = text;
|
32
|
+
}
|
33
|
+
|
34
|
+
// Test if media query is true or false
|
35
|
+
return info.width === '1px';
|
36
|
+
}
|
37
|
+
};
|
38
|
+
}
|
39
|
+
|
40
|
+
return function(media) {
|
41
|
+
return {
|
42
|
+
matches: styleMedia.matchMedium(media || 'all'),
|
43
|
+
media: media || 'all'
|
44
|
+
};
|
45
|
+
};
|
46
|
+
}());
|