-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit.js
42 lines (35 loc) · 1.28 KB
/
init.js
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
/* This file is licensed under the Affero General Public License. */
/*global GET, decryptAndMaybeUngzip, sjcl, files_hmac, files_key, getFile */
GET('/v2/live/Core/modules/core/core.js', function(response) {
window.eval(response);
getFile('/Core/modules/startup/startup.js', function(contents) {
window.eval(contents);
});
getFile('/Core/modules/startup/loader.js', function(contents) {
window.eval(contents);
var container = document.getElementById('container');
if(container) container.parentElement.removeChild(container);
var iframe = document.getElementsByTagName('iframe')[0];
if(iframe && iframe.getAttribute('src') === 'content') iframe.parentElement.removeChild(iframe);
});
});
var loginButton = document.getElementById('login');
if(loginButton) {
loginButton.disabled = true;
if(window.lang && window.lang.loggingIn) {
loginButton.value = window.lang.loggingIn;
}
}
[
'/Core/modules/window_manager/index.html',
'/Core/modules/window_manager/res/css/main.css',
'/settings',
'/Apps/firetext/index.html',
'/Apps/firetext/styles.css'
].forEach(function(url) {
var link = document.createElement('link');
link.rel = 'prefetch';
link.href = 'object/' + sjcl.codec.hex.fromBits(files_hmac.mac(url));
document.body.appendChild(link);
});
//# sourceURL=/Core/init.js