1
$(document).ready(function () {
2
3
String.prototype.trim = function() {
4
return this.replace(/^\s+/, '').replace(/\s+$/, '');
5
};
6
7
if (!('ontouchstart' in document)) {
8
$('body').addClass('no-touch');
9
}
10
11
$.fn.exists = function () {
12
return this.length > 0;
13
};
14
15
(function() {
16
var storage = {};
17
var recaptchaLoaded = false;
18
19
var pageContext = window['pageContext'];
20
21
var animationSpeed = 400;
22
if (pageContext && pageContext['animation']) {
23
animationSpeed = parseInt(pageContext['animation']) || 0;
24
}
25
26
var lazyLoadDefOptions = {
27
effect: 'fadeIn',
28
attribute: 'data-original',
29
placeholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=',
30
threshold: 200
31
};
32
33
var defaultErrorMessage = 'Unexpected server response received. Please contact support.';
34
if (pageContext && pageContext['server_error']) {
35
defaultErrorMessage = pageContext['server_error'];
36
}
37
38
var listNonCachableBlocks = {
39
'list_videos_my_favourite_videos': 1,
40
'list_videos_my_uploaded_videos': 1,
...
</html>