-
Notifications
You must be signed in to change notification settings - Fork 0
/
tooltip.html
82 lines (73 loc) · 1.44 KB
/
tooltip.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
<html>
<head>
<title>wd-office</title>
<meta charset="utf-8">
<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="viewport" content="width=600, user-scalable=no">
<script src="static/vue.js"></script>
<style>
html {
padding: 15px;
overflow: hidden;
background: transparent;
user-select: none;
}
#app,
.v-application--wrap {
background: transparent;
min-height: inherit;
}
pre {
opacity: 0.9;
app-region: drag;
padding: 10px;
background: white;
border-radius: 5px;
white-space: break-spaces;
word-wrap: break-word;
}
</style>
</head>
<body>
<div id="app">
<v-app>
<div v-if="content">
<b style="
color: red;
position: absolute;
right: 5px;
top: 5px;
background: gray;
border-radius: 23px;
padding: 8px;
line-height: 0.9;
" @click="close_window()">X</b>
<pre>{{content}}</pre>
</div>
</v-app>
</div>
<script>
app = new Vue({
el: '#app',
data: () => ({
content: ""
}),
methods: {
}
})
w = nw.Window.get()
w.setAlwaysOnTop(true)
w.setShowInTaskbar(false)
gui = require('nw.gui')
gui.Window.getAll(l => window.abort_chatting = l[0].window.abort_chatting)
close_window = () => {
setTimeout(() => {
app.content = ''
}, 100)
abort_chatting()
}
</script>
</body>
</html>