-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
183 lines (169 loc) · 5.85 KB
/
popup.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html>
<head>
<style>
html {
background: #333;
color: #e5e5e5;
min-width: 525px;
min-height: 100px;
}
body {
margin: 15px;
}
a, a:visited {
color: #e7c96e;
}
label {
display: flex;
justify-content: space-between;
margin: 5px;
}
input {
width: 292px;
padding: 2px;
}
select {
width: 300px;
padding: 2px;
}
textarea {
white-space: nowrap;
width: 294px;
min-height: 40px;
transition: min-height 0.15s;
}
textarea:focus {
min-height: 150px;
}
</style>
</head>
<body>
<h2>KotN Helper</h2>
<p><em>Notifications only work while the site is open!</em></p>
<p><a id="watched_listings_link" href="#">Open Watched Listings</a></p>
<div>
<h3>User Info</h3>
<div>
<label title="This will get filled in automatically">
Username
<input data-option_key="options.user.username" type="text">
</label>
</div>
</div>
<div>
<h3>Browser Notifications</h3>
<div>
<label title="2 minutes and 5 seconds before auction end time">
When listing is ending
<select data-option_key="options.notifications.ending">
<option value="disabled">Don't notify me</option>
<option value="always">Always notify me</option>
<option value="unlessWinning" selected>Only notify me if I'm losing</option>
</select>
</label>
</div>
<div>
<label>
When outbid
<select data-option_key="options.notifications.outbid">
<option value="disabled">Don't notify me</option>
<option value="always">Always notify me</option>
<option value="last2minutes" selected>Only notify me if outbid as listing is ending</option>
</select>
</label>
</div>
<div>
<label>
When item won
<select data-option_key="options.notifications.itemWon">
<option value="disabled">No notification</option>
<option value="always" selected>Always notify me</option>
</select>
</label>
</div>
</div>
<h3>Webhook Notifications</h3>
<p>Webooks will be called via POST with a JSON payload containing event details</p>
<div>
<label>
<div>
Webhook URLs<br />
<em>one per line</em>
</div>
<textarea data-option_key="options.webhooks.urls"></textarea>
</label>
</div>
<div>
<label title="2 minutes and 5 seconds before auction end time">
When listing is ending
<select data-option_key="options.webhooks.ending">
<option value="disabled">Don't notify me</option>
<option value="always">Always notify me</option>
<option value="unlessWinning" selected>Only notify me if I'm losing</option>
</select>
</label>
</div>
<div>
<label>
When outbid
<select data-option_key="options.webhooks.outbid">
<option value="disabled">Don't notify me</option>
<option value="always">Always notify me</option>
<option value="last2minutes" selected>Only notify me if outbid as listing is ending</option>
</select>
</label>
</div>
<div>
<label>
When item won
<select data-option_key="options.webhooks.itemWon">
<option value="disabled">No notification</option>
<option value="always" selected>Always notify me</option>
</select>
</label>
</div>
<div>
<h3>Conflict Prevention</h3>
<div>
<label>
<div>
Friend Usernames<br />
<em>one per line</em>
</div>
<textarea data-option_key="options.friends.names"></textarea>
</label>
</div>
<div>
<label>
<div>
Spouse Usernames<br />
<em>one per line</em>
</div>
<textarea data-option_key="options.spouses.names"></textarea>
</label>
</div>
</div>
<div>
<h3>Tweaks</h3>
<div>
<label>
Default items per page
<select data-option_key="options.tweaks.itemsPerPage">
<option value="default" selected>Do not change</option>
<option value="25">25 items</option>
<option value="50">50 items</option>
<option value="75">75 items</option>
<option value="100">100 items</option>
</select>
</label>
</div>
</div>
<h3>Testing</h3>
<p><a id="test_ending_winning_notification" href="#">Test ending soon (but winning) notification</a></p>
<p><a id="test_ending_losing_notification" href="#">Test ending soon (and losing) notification</a></p>
<p><a id="test_outbid_notification" href="#">Test outbid notification</a></p>
<p><a id="test_item_won_notification" href="#">Test item won notification</a></p>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>