-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
253 lines (253 loc) · 11.2 KB
/
search.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<title>Login All Pt</title>
<script src="http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/Swiper/2.7.6/idangerous.swiper.min.js"></script>
<link rel="stylesheet" href="http://cdn.bootcss.com/Swiper/2.7.6/idangerous.swiper.min.css">
<style>
body,h1,h2,h3,hr,p,dl,dt,dd,ul,ol,li,button,input,textarea,th,td{margin:0;padding:0}body,button,input,select,textarea{font:12px/1 Tahoma,Helvetica,Arial,"\5fae\8f6f\96c5\9ed1",sans-serif}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}address,em,i{font-style:normal}code,kbd,pre,samp{font-family:"Courier New",Courier,monospace}b,strong{font-weight:normal}ul,ol{list-style:none}a{text-decoration:none;color:inherit}button,input,select,textarea{font-size:100%}input:focus{outline:none}table{border-collapse:collapse;border-spacing:0}hr{border:none;height:1px}.clearfix::before,.clearfix::after{content:".";display:block;height:0;visibility:hidden}.clearfix::after{clear:both}.clearfix{zoom:1}.pr{position:relative}.pa{position:absolute}.fl{float:left}.fr{float:right}
.swiper-container{
width:95%;
margin-left: 0;
}
.swiper-wrapper,.swiper-slide,iframe{
width: 100%;
}
.right-fixed{
position: fixed;
right: 0;
bottom: 30px;
z-index: 9999;
}
.menu{
float: right;
}
.qd{
margin-bottom: 10px;
padding-right: 9px;
}
.qd a{
float: right;
display: inline-block;
font-size: 12px;
padding: 2px 3px;
border: 1px #bbb solid;
width: 51px;
height: 14px;
transition: all .3s;
}
.qd a:hover{
background-color: #f06;
border-radius: 10px;
color: #fff;
}
.search{
margin-bottom: 10px;
padding-right: 9px;
background: white;
font-size: 25px;
}
.search i{
display: inline-block;
border: 1px solid #bbb;
padding: 2px 3px;
width: 51px;
height: 52px;
transition: all .3s;
}
.search textarea{
border: 0 none;
width: 51px;
height: 52px;
transition: all .3s;
resize: none;
outline: none;
overflow: hidden;
}
.se-anim i{
width: 300px;
}
.se-anim textarea{
width: 300px;
height: 52px;
}
.search button{
display: none;
}
.menu span{
display: block;
float: left;
background: #000;
text-align: left;
color: #fff;
font-size: 14px;
padding: 2px 5px 2px;
margin: 1px 0;
transition: all .3s;
cursor: pointer;
clear: both;
}
.menu span:hover,.menu .swiper-active-switch{
background: #f06;
transform: scale(1.1) translateX(-10px);
}
</style>
</head>
<body>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<iframe data-src='https://totheglory.im/browse.php?c=M' data-name='TTGlory' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://tp.m-team.cc/torrents.php' data-name='M-Team' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://chdbits.co/torrents.php' data-name='CHDBits' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://hdchina.org/torrents.php' data-name='HDChina' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://hdsky.me/torrents.php' data-name='HDSky' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://hdcmct.org/torrents.php' data-name='CMCT' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://pt.upxin.net/torrents.php' data-name='HDUpxin' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://www.hyperay.org/torrents.php' data-name='Hyperay' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://ourbits.club/torrents.php' data-name='OurBits' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://hdhome.org/torrents.php' data-name='HDHome' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://et8.org/torrents.php' data-name='TCCF' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='http://hdtime.org/torrents.php' data-name='HDTime' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://hdcity.leniter.org/pt' data-name='HDCity' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://www.joyhd.net/torrents.php' data-name='JoyHD' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='http://pt.eastgame.org/torrents.php' data-name='TLFBits' frameborder='0'></iframe>
</div>
<!--<div class="swiper-slide">
<iframe data-src='http://tthd.org/torrents.php' data-name='TTHD' frameborder='0'></iframe>
</div>-->
<div class="swiper-slide">
<iframe data-src='http://pt.btschool.net/torrents.php' data-name='BTSchool' frameborder='0'></iframe>
</div>
<div class="swiper-slide">
<iframe data-src='https://open.cd/torrents.php?boardid=1' data-name='OpenCD' frameborder='0'></iframe>
</div>
<!--<div class="swiper-slide">
<iframe data-src='https://pt.hit.edu.cn/torrents.php' data-name='清影PT' frameborder='0'></iframe>
</div>-->
</div>
</div>
<div class="right-fixed">
<!-- <div class="qd clearfix">
<a id="qd" href="">一键签到</a>
</div> -->
<div id="search" class="search">
<i><textarea onkeypress="if(event.keyCode==13) return false;" id="seinput" placeholder="一键搜索"></textarea></i>
</div>
<div id="menu" class="menu clearfix"></div>
</div>
<script>
//resize width height
function resizeWH(){
var windowH = $(window).height();
$(".swiper-container,.swiper-slide,iframe").height(windowH);
};
resizeWH();
$(window).resize(function(){
resizeWH();
});
// 生成右侧pt名为nav,生成url、name
$('iframe').each(function(ifIndex){
var ptname = $(this).attr('data-name'),
url = $(this).attr('data-src'),
date = new Date();
$('#menu').append('<span class="swiper-pagination-switch">' + ptname + '</span>');
$(this).attr('name', 'nocache' + ifIndex + date.getTime());//每次刷新更改iframe名防止页面缓存
$(this).attr('src', url + '?nocache=' + date.getTime());//每次刷新url加字符串防止页面缓存
});
var mySwiper = new Swiper('.swiper-container', {
loop:true,
mode:'vertical',
keyboardControl:true,
// mousewheelControl:true,
// mousewheelControlForceToAxis:true,
pagination:'#menu',
paginationClickable:true,
createPagination:false,
});
//搜索
$(window).keydown(function(b){
if(b.keyCode==27){//Esc键失焦
$('#seinput').blur();
}
});
$('#seinput').hover(function(){
$(this).focus();
$(this).attr('placeholder','请输入关键词,再按回车键');
if($('#search').hasClass('se-anim')){//如果有se-anim类(焦点状态),重新hover不选中文字
}else{
$(this).select();
};
$('#search').addClass('se-anim');
},{}).blur(function(){
$('#search').removeClass('se-anim');
$(this).attr('placeholder','一键搜索');
});
$('#seinput').keyup(function(e){
var keywords = $.trim($(this).val());
if(e.keyCode==13&&keywords){//回车键、关键词不为空
$("iframe").each(function(){
var ifdataname = $(this).attr('data-name'),
url = $(this).attr('data-src');
if(ifdataname=='HDCity'){
$(this).attr('src', url + '?incldead=1&spstate=0&inclbookmarked=0&search_area=0&search_mode=0&iwannaseethis=' + keywords)
}else if(ifdataname=='TTGlory'){
$(this).attr('src', url + '&search_field=' + keywords)
}else if(ifdataname=='HDChina'){
$(this).attr('src', url + '?incldead=1&spstate=0&inclbookmarked=0&boardid=0&seeders=&search_area=0&search_mode=0&search=' + keywords)
}else if(ifdataname=='CMCT'){
$(this).attr('src', url + '?incldead=1&spstate=0&pick=0&inclbookmarked=0&search_area=0&search_mode=0&search=' + keywords)
}else{
//if(ifdataname=='M-Team'||ifdataname=='CHDBits'||ifdataname=='HDSky'||ifdataname=='HDQueen'||ifdataname=='HDHome'||ifdataname=='TLFBits'||ifdataname=='OurBits'||ifdataname=='TCCF'||ifdataname=='HDTime'||ifdataname=='HDUpxin'||ifdataname=='TTHD'||ifdataname=='BTSchool'||ifdataname=='GZTown'||ifdataname=='NanFeng'||ifdataname=='JoyHD'||ifdataname=='WTFUDL')
$(this).attr('src', url + '?incldead=1&spstate=0&inclbookmarked=0&search_area=0&search_mode=0&search=' + keywords)
}
});
$('#search').removeClass('se-anim');
$(this).attr('placeholder','一键搜索');
$(this).blur();
}
});
//一键签到,跨域问题无解
// $('#qd').click(function(a){
// a.preventDefault();
// $('iframe').each(function(){
// var ifnameS = $(this).attr('name');
// $(window.frames[ifnameS].document).find('#signin_bonus').click();
// $(window.frames[ifnameS].document).contents().find('#signin_bonus').click();
// window.frames[ifnameS].document.getElementById('signin_bonus').style.background="red";
// })
// });
</script>
</body>
</html>