-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
224 lines (194 loc) · 10.8 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
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>阿里旺旺网页版启动器 (Web Aliwangwang Launcher)</title>
<style>
*, input {
box-sizing: border-box;
}
html {
background: #eee;
}
body {
margin: 0;
font-family: "Hiragino Sans GB", sans-serif;
}
body::before {
content: "哇";
display: block;
font-size: 200px;
width: 200px;
height: 200px;
line-height: 200px;
text-align: center;
transform: rotate(20deg);
color: rgb(204, 204, 204);
position: absolute;
z-index: -1;
left: 50%;
top: 50px;
margin-left: -320px;
}
body::after {
content: "哇";
display: block;
font-size: 400px;
width: 400px;
height: 400px;
line-height: 400px;
text-align: center;
transform: rotate(-30deg);
color: rgb(222, 222, 222);
position: absolute;
z-index: -1;
left: 50%;
top: 20px;
margin-left: -50px;
}
fieldset {
border: 0;
padding: 0;
margin: 0;
}
legend {
display: none;
}
h1,
h2 {
text-align: center;
}
h2 {
font-size: 1.17em;
font-weight: normal;
}
h2 code {
font-size: 1.17em;
}
h1,
h2,
h2 a {
color: #666;
}
h2 a:hover {
color: #333;
font-weight: bold;
}
#waww-launcher {
max-width: 480px;
margin-left: auto;
margin-right: auto;
padding-top: 100px;
}
.entrance {
position: relative;
}
#username {
display: block;
font-size: 24px;
padding: .5em;
text-align: center;
margin-bottom: .5em;
width: 480px;
transition: width .3s;
position: relative;
z-index: 2;
}
#username:focus {
}
#launch {
display: block;
width: 480px;
font-size: 24px;
padding: 10px 0 10px 0;
text-align: center;
border: 0;
background: #729fcf;
color: #fff;
border-bottom: 4px solid #204a87;
cursor: pointer;
}
#launch:hover {
background: #3465a4;
}
#launch:active {
background: #204a87;
padding-top: 12px;
padding-bottom: 12px;
border-bottom: 0;
}
.online-status {
display: none;
width: 48px;
height: 48px;
position: absolute;
right: 0;
top: 50%;
margin-top: -24px;
/* hide below the animating <input/> */
z-index: 1;
}
.entrance.open .online-status {
display: block;
/** The loading icon was generated by: http://loading.io */
background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0nNDBweCcgaGVpZ2h0PSc0MHB4JyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgY2xhc3M9InVpbC1zcGluIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0ibm9uZSIgY2xhc3M9ImJrIj48L3JlY3Q+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIj4KICAgIDxnIHRyYW5zZm9ybT0icm90YXRlKDApIHRyYW5zbGF0ZSgzNCAwKSI+CiAgICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSI4IiBmaWxsPSIjMDAwIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9t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pbWF0ZT4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBmcm9tPSIxLjUiIHRvPSIxIiBiZWdpbj0iMC43NXMiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICAgIDwvY2lyY2xlPgogICAgPC9nPgogICAgPGcgdHJhbnNmb3JtPSJyb3RhdGUoMzE1KSB0cmFuc2xhdGUoMzQgMCkiPgogICAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iOCIgZmlsbD0iIzAwMCI+CiAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZnJvbT0iMSIgdG89IjAuMSIgYmVnaW49IjAuODdzIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSI+PC9hbmltYXRlPgogICAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGZyb209IjEuNSIgdG89IjEiIGJlZ2luPSIwLjg3cyIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgICAgPC9jaXJjbGU+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4=") no-repeat center center;
}
.entrance.open #username {
width: 422px;
}
</style>
</head>
<body>
<!-- 淘宝/天猫官网上的旺旺聊天按钮 was broken -->
<form id="waww-launcher" target="_blank" method="GET" action="http://www.taobao.com/webww/index.php">
<h1>
阿里旺旺网页版启动器
</h1>
<h2>
<code><a href="https://github.com/gaomd/waww-launcher">waww-launcher</a></code>
- <strong>W</strong>eb <strong>A</strong>li<strong>w</strong>ang<strong>w</strong>ang <strong>Launcher</strong>
</h2>
<fieldset>
<legend>阿里旺旺网页版启动器</legend>
<input type="hidden" name="siteid" value="cntaobao"/>
<input type="hidden" name="charset" value="utf-8"/>
<div class="entrance">
<input type="text" id="username" name="touid" placeholder="旺旺用户名[:客服名]"/>
<img id="online-status" class="online-status"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
alt="Aliwangwang Online Status Indicator"/>
</div>
<input type="submit" id="launch" value="开始拷问卖家 »"/>
</fieldset>
</form>
<a href="https://github.com/gaomd/waww-launcher"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.3.min.js"></script>
<script>
$(function () {
var $entrance = $(".entrance");
var $username = $("#username");
var $onlineStatus = $(".entrance .online-status");
$username.on("focus", function () {
$onlineStatus.attr("src", "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
$entrance.removeClass("open");
}).on("blur", function () {
if (!$username.val()) {
return;
}
// Refer to http://www.taobao.com/wangwang/2010_fp/world.php
// There are only two status icon: online and offline, mobile online seems deprecated by Taobao.
// Chrome 40 caches the URL.
// https://amos.alicdn.com is not supported, we should notice user if this page is served via HTTPS.
$onlineStatus.attr("src", "http://amos.alicdn.com/realonline.aw?v=2&uid=" + encodeURIComponent($username.val()) + "&site=cntaobao&s=2&charset=utf-8");
$entrance.addClass("open");
});
$("#waww-launcher").on("submit", function ($e) {
if (!$username.val()) {
$e.preventDefault();
$username.focus();
}
});
});
</script>
</body>
</html>