-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.jsx
50 lines (34 loc) · 1.07 KB
/
init.jsx
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
#targetengine session_thetech
app.xmlExportPreferences.fileEncoding = XMLFileEncoding.utf8;
(function() {
function main() {
#include "../Extendables/extendables.jsx"
var TechLib = {};
TechLib.STATE = "Dev"
TechLib.DIR = (new File($.fileName)).parent
TechLib.ui = require('ui');
TechLib.http = require('http');
if (!TechLib.http.has_internet_access()) {
alert("You have to be connected to the internet to use TechLib");
return;
}
#include "./helpers/api.jsx"
#include "./helpers/other.jsx"
#include "./config/constants.jsx"
#include "./config/load_cms_constants.jsx"
#include "./helpers/GetURLs.jsx"
#include "./functions/checkout.jsx"
#include "./functions/style_mapping.jsx"
#include "./panels/checkoutPopup.jsx"
TechLib.DOC.loadXMLTags(File(TechLib.DIR+'/xml/tags.xml'));
#include "./indesign_setup.jsx"
}
if (app.documents.count() != 0) {
main();
}
app.addEventListener('afterOpen', function(e) {
if (!(e.target instanceof Document)) {
main();
}
}, false);
})();