You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
3.0 KiB
87 lines
3.0 KiB
{% autoescape None %}
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="msapplication-tap-highlight" content="no" />
|
|
|
|
{% for url in fireEvent('clientscript.get_styles', single = True) %}
|
|
<link data-url="{{ url }}" rel="stylesheet" href="{{ Env.get('web_base') }}{{ url }}" type="text/css">{% end %}
|
|
{% for url in fireEvent('clientscript.get_scripts', single = True) %}
|
|
<script type="text/javascript" src="{{ Env.get('web_base') }}{{ url }}"></script>{% end %}
|
|
|
|
<link href="{{ Env.get('static_path') }}images/favicon.ico" rel="icon" type="image/x-icon" />
|
|
<link rel="apple-touch-icon" href="{{ Env.get('static_path') }}images/homescreen.png" />
|
|
|
|
{% if Env.get('dev') %}
|
|
<script src="//localhost:35729/livereload.js?snipver=1"></script>
|
|
{% end %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.addEvent('domready', function() {
|
|
|
|
new Uniform();
|
|
|
|
Api.setup({
|
|
'url': {{ json_encode(Env.get('api_base')) }},
|
|
'path_sep': {{ json_encode(sep) }},
|
|
'is_remote': false
|
|
});
|
|
|
|
$(document.body).set('data-api', window.location.protocol + '//' + window.location.host + Api.createUrl().replace('/default/', '/'));
|
|
|
|
// Catch errors
|
|
var dev = {{ json_encode(Env.get('dev')) }};
|
|
if(!dev){
|
|
window.onerror = function(message, file, line){
|
|
|
|
p(message, file, line);
|
|
|
|
Api.request('logging.log', {
|
|
'data': {
|
|
'type': 'error',
|
|
'message': Browser.name + ' ' + Browser.version + ': \n' + message,
|
|
'page': window.location.href.replace(window.location.host, 'HOST'),
|
|
'file': file.replace(window.location.host, 'HOST'),
|
|
'line': line
|
|
}
|
|
});
|
|
|
|
return true;
|
|
}
|
|
}
|
|
|
|
Quality.setup({
|
|
'profiles': {{ json_encode(fireEvent('profile.all', single = True)) }},
|
|
'qualities': {{ json_encode(fireEvent('quality.all', single = True)) }}
|
|
});
|
|
|
|
CategoryList.setup({{ json_encode(fireEvent('category.all', single = True)) }});
|
|
|
|
App.setup({
|
|
'dev': dev,
|
|
'base_url': {{ json_encode(Env.get('web_base')) }},
|
|
'dereferer': {{ json_encode(Env.setting('dereferer')) }},
|
|
'args': {{ json_encode(Env.get('args', unicode = True)) }},
|
|
'options': {{ json_encode(('%s' % Env.get('options'))) }},
|
|
'app_dir': {{ json_encode(Env.get('app_dir', unicode = True)) }},
|
|
'data_dir': {{ json_encode(Env.get('data_dir', unicode = True)) }},
|
|
'pid': {{ json_encode(Env.getPid()) }},
|
|
'userscript_version': {{ json_encode(fireEvent('userscript.get_version', single = True)) }}
|
|
});
|
|
})
|
|
|
|
{% if Env.setting('show_wizard') %}
|
|
if(!window.location.href.contains('wizard'))
|
|
window.location = '{{ Env.get('web_base') }}wizard/'
|
|
{% end %}
|
|
|
|
</script>
|
|
<title>CouchPotato</title>
|
|
</head>
|
|
<body></body>
|
|
</html>
|
|
|