-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.html
94 lines (90 loc) · 3.41 KB
/
main.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
<html>
<head>
<title>轻国下书-LKBook Geter</title>
<style>
h2{margin: 2px;
padding: 5px;
text-align: center;
color: #333;
font-family: "Microsoft YaHei" !important;
-webkit-border-radius: 5px;
border: 1px solid #a2c159;
background-color: #a2c159;}
body{
background-color:#ecebeb;
font-family: "Microsoft YaHei" !important;
border:0;
font-size: 100%;
margin:5px;
outline:0;
padding:0;
}
label{display:block;padding:2px;margin:5px 0 8px;border:1px dashed #CCA;border-width:1px 0;background-color:#FFC;color:#454545;}
#send,#stop{padding:2px;margin:0 2px 0 0;background-color:#C2D5E3;font-family: "Microsoft YaHei" !important;}
input[type="text"]{width:210px;margin-right:10px;}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" type="text/javascript"></script>
<script language="javascript">
window.resizeTo(410, 204);
</script>
</head>
<body>
<h2>轻国下书</h2>
<form action="/" method="POST">
请输入轻国论坛网址:
<br/>
<input type="text" name="url"><span id="send">开始下书</span><span id="stop">终止运行</span>
<br/>
<input type="checkbox" name="login" />
需要登录
<input type="checkbox" name="chardet" />
转换为简体
<br/>
<div class="notices">
<label class="notice">Ready...</label>
</div>
</form>
<script language="javascript">
this.timer = setInterval(function () {
jQuery.ajax({
url:'/',
data: 'action=getState',
type: 'post',
success: function (data) {
data=JSON.parse(data);
if(data=="")
return;
$(".notices").empty();
for (i in data){
var labelItem=document.createElement("label");
labelItem.innerHTML=data[i];
$(".notices").append(labelItem);
}
window.resizeTo(410, 200+25*data.length);
// jQuery(".notice").html(data);
}
});
}, 500);
jQuery("#send").click(function(){
jQuery.ajax({
url:'/',
data: 'action=sendUrl&url='+jQuery(":text").val(),
type: 'post',
// success: function (data) {
// jQuery(".notice").html(data);
// }
});
});
jQuery("#stop").click(function(){
jQuery.ajax({
url:'/',
data: 'action=stop',
type: 'post',
success: function (data) {}
});
window.open('','_parent','');
window.close();
});
</script>
</body>
</html>