Files
YYeTsBot/yyets/worker/public/search.html
2021-09-21 19:46:11 +08:00

83 lines
2.4 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>人人影视下载分享</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Pacifico&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" rel="stylesheet">
<style>
h1 {
font-family: Pacifico, sans-serif;
font-size: 4em;
color: #3eb5f1;
margin: 0;
}
h2 {
font-weight: 300;
font-family: sans-serif;
}
.centered {
/*position: fixed;*/
top: 50%;
left: 50%;
/*transform: translate(-50%, -50%);*/
text-align: center;
}
</style>
</head>
<body>
<div class="centered">
<br>
<h1>人人影视下载分享</h1>
<h1>By Benny</h1>
<br>
<h2>这是我偷过来的,嘿嘿😝</h2>
<h2><a style="text-decoration: none;color: deepskyblue" href="https://t.me/yyets_bot">这个 Telegram Bot</a>
里去使用,或者使用下方搜索框</h2>
<form action="search.html">
<label>
<input name="kw" id="kw" type="text">
</label>
<input type="checkbox" id="clear_cache" onclick="reloadIndex()"> <label for="clear_cache">清除缓存</label>
<input type="submit" value="搜索">
</form>
<hr>
<div id="tv">
</div>
<hr>
<h2>有问题请联系 <a style="text-decoration: none;color: green" href="https://t.me/BennyThink">Benny小可爱</a></h2>
</div>
</body>
<script src="js/search.js"></script>
<script>
let kwe = document.URL.split("kw=")[1];
let kw = decodeURI(kwe).toLowerCase().replace(" ", "");
let firstSearch = localStorage.getItem("firstSearch");
let nowTS = Date.parse(Date()).toString();
let has_data = localStorage.getItem("index");
if (has_data === null || firstSearch === null || parseInt(nowTS) - parseInt(firstSearch) > 3600 * 24 * 1000 * 7) {
localStorage.setItem("firstSearch", nowTS);
loadJSON(indexURL,
function (data) {
let jsonText = JSON.stringify(data);
localStorage.setItem("index", jsonText);
doSearch()
},
function (xhr) {
console.error(xhr);
});
} else {
doSearch()
}
</script>
</html>