-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathindex.html
161 lines (125 loc) · 5.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Lampa - Каталог фильмов и сериалов</title>
<meta name="description" content="Приложение для просмотра каталога фильмов и сериалов на телевизорах, приставках и смартфонах." />
<meta property="og:title" content="Lampa - Каталог фильмов и сериалов">
<meta property="og:description" content="Приложение для просмотра каталога фильмов и сериалов на телевизорах, приставках и смартфонах.">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="og.png">
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="manifest" href="icons/site.webmanifest" crossorigin="use-credentials">
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="icons/favicon.ico">
<meta name="msapplication-TileColor" content="#1d1f20">
<meta name="msapplication-config" content="icons/browserconfig.xml">
<meta name="theme-color" content="#1d1f20">
<meta name="referrer" content="never">
<link rel="stylesheet" href="./vender/scrollbar/jquery.scrollbar.css">
<link rel="stylesheet" href="./vender/keypad/style.css">
<link rel="stylesheet" href="css/app.css?v=4.53">
</head>
<body>
<script>
window.youtube_lazy_load = true
</script>
<div class="welcome"></div>
<div id="app">
</div>
<div class="no-network hide">
<div class="no-network__title">Ошибка</div>
<div class="no-network__desc">Не удалось загрузить файл: <span class="no-network__file"></span></div>
</div>
<script src="./webos/webOSTV.js"></script>
<script src="./vender/jquery/jquery.js"></script>
<script src="./vender/notify/notify.js"></script>
<script src="./vender/scrollbar/jquery.scrollbar.js"></script>
<script src="./vender/navigator/navigator.js"></script>
<script src="./vender/keypad/keypad.js"></script>
<script>
var lampa_url = '';
var cache_version = Math.floor((new Date()).getTime() / 9e5); // Новое значение каждые 15 минут
function URL(base, add) {
if (base.charAt(base.length - 1) !== '/') {
base += '/'
}
return base + add
}
function putScript(scripts, onload, onerror){
var add = function(src){
console.log('Loader', 'try-load-script', src)
var trys = 0
var sreateScript = function(){
var script = document.createElement('script')
script.type = 'text/javascript'
script.onload = script.onreadystatechange = function(e) {
console.log('Loader', 'Script loaded', e)
if (!!onload) onload()
};
script.onerror = function(){
trys++
console.log('Loader', 'error-load-script', src)
if(trys < 3){
sreateScript()
} else if (!!onerror) {
onerror()
} else{
$('.no-network').removeClass('hide')
$('.no-network__file').text(window.location.href + '/' + src)
}
}
script.src = src
document.getElementsByTagName('body')[0].appendChild(script)
}
sreateScript()
}
add(scripts)
}
function loadCurrentLampa() {
putScript('app.min.js?v=' + cache_version, function () {})
}
function loadLocalLampa(){
if(lampa_url !== '') window.local_lampa = true
loadCurrentLampa()
}
if (typeof AndroidJS !== "undefined"
&& !!AndroidJS.getLampaURL
&& /^https?:\/\//i.test(AndroidJS.getLampaURL())
&& !/^https?:\/\//i.test(location.href)
) {
lampa_url = URL(AndroidJS.getLampaURL(),'')
}
if (lampa_url !== '') {
putScript(
URL(lampa_url, 'app.min.js?v=' + cache_version),
function () {
var css = URL(lampa_url, 'css/app.css?v=' + cache_version)
$('head').append('<link rel="stylesheet" href="' + css + '">')
},
function () {
putScript(
URL(lampa_url, 'lampa-main/app.min.js?v=' + cache_version),
function () {
var css = URL(lampa_url, 'lampa-main/css/app.css?v=' + cache_version)
$('head').append('<link rel="stylesheet" href="' + css + '">')
putScript(
URL(lampa_url, 'lampainit.js?v=' + cache_version),
false,
function(){}
)
},
loadLocalLampa
)
}
)
}
else{
loadCurrentLampa()
}
</script>
</body>
</html>