This repository has been archived by the owner on Sep 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (82 loc) · 3.89 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
<!DOCTYPE html>
<html>
<head>
<title>PSO2 Utility</title>
<meta charset="utf-8" />
<link id="styleLink" rel="stylesheet" href="mainStyle.dark.css" />
<script>
const fs = require("fs");
const React = require("react");
const ReactDOM = require("react-dom");
const path = require("path");
const electron = require("electron");
const url = require("url");
const opn = require("opn");
if(navigator.userAgent.match(/pso2tools\/([0-9a-zA-Z.-]*)/)[1].match(/-dev$/)){
require('electron-react-devtools').install()
}
</script>
</head>
<body>
<div class="windowTitle">
<span class="title">PSO2 Utility</span>
<span class="button">
<button onclick="if(document.getElementById('styleLink').href.match(/\.dark\./) != null){document.getElementById('styleLink').href = 'mainStyle.css'}else{document.getElementById('styleLink').href = 'mainStyle.dark.css'}">
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
<use href="images/light.svg#light" />
</svg>
</button>
<button onclick="electron.remote.BrowserWindow.getFocusedWindow().minimize()">
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
<use href="images/minimize.svg#minimize" />
</svg>
</button>
<button onclick="if(electron.remote.BrowserWindow.getFocusedWindow().isMaximized()){electron.remote.BrowserWindow.getFocusedWindow().unmaximize()}else{electron.remote.BrowserWindow.getFocusedWindow().maximize()}">
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
<use href="images/maximize.svg#maximize" />
</svg>
</button>
<button onclick="window.close()" class="close">
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
<use href="images/close.svg#close" />
</svg>
</button>
</span>
</div>
<div class="windowContent">
<div class="tab" id="tabButtons"></div>
<div class="tabContainers" id="tabContainers">Loading...</div>
</div>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<script type="text/babel" src="pso2tools.js"></script>
<script type="text/babel" src="pso2tools_module.js"></script>
<script type="text/babel" src="modules/TaCounter.babel.js"></script>
<script type="text/babel" src="modules/Memo.babel.js"></script>
<script type="text/babel" src="modules/ClassLevel.babel.js"></script>
<script type="text/babel" src="modules/DeleteCharacter.babel.js"></script>
<script type="text/babel" src="modules/ChatLog.babel.js"></script>
<script type="text/babel" src="modules/Links.babel.js"></script>
<script type="text/babel" src="modules/Settings.babel.js"></script>
<script type="text/babel" src="modules/Emergency.babel.js"></script>
<script type="text/babel" src="modules/devToolOpen.bebel.js"></script>
<script type="text/babel">
var app = new pso2tools(path.join(process.cwd(),"pso2db.db"));
app.loadModule(Settings);
app.loadModule(TaCounter);
app.loadModule(Memo);
app.loadModule(ClassLevel);
app.loadModule(DeleteCharacter);
app.loadModule(ChatLog);
app.loadModule(Links);
app.loadModule(Emergency);
if(app.getVersion().match(/-dev$/) != null){
app.loadModule(devToolOpen);
}
app.render();
setInterval(()=>{
app.render();
}, 10000);
document.querySelector(".windowTitle .title").innerText = document.title = "PSO2 Utility " + app.getVersion();
</script>
</body>
</html>