-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
71 lines (71 loc) · 3.17 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Search for Windows ISOs</title>
</head>
<body>
<script>
function contain(owner,cin)
{
if (owner.indexOf(cin) > -1)
{
return(true) ;
}
else
{
return(false) ;
}
}
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++)
{
var pair = vars[i].split("=");
if(pair[0] == variable)
{
return pair[1];
}
}
return("");
}
function checkcheck(n)
{
if (document.getElementById(n).checked)
{
return("checked") ;
}
else
{
return("") ;
}
}
function myFunction()
{
window.open('https://144881-studios.github.io/pymodule/search/search.html?name='+document.getElementById('name').value+'&onModulename='+checkcheck('onModulename')+'&onAuthor='+checkcheck('onAuthor')+'&onTime='+checkcheck('onTime')+'&onVer='+checkcheck('onVer')) ;
}
document.write('Search by:<input id="onModulename" type="checkbox" name="type" value="onModulename" '+getQueryVariable("onModulename")+'>Module name <input id="onAuthor" type="checkbox" name="type" value="onAuthor" '+getQueryVariable("onAuthor")+'>Author <input id="onTime" type="checkbox" name="type" value="onTime" '+getQueryVariable("onTime")+'>Time <input id="onVer" type="checkbox" name="type" value="onVer" '+getQueryVariable("onVer")+'>Latest version<br>') ;
document.write('<input id="name" type="text" name="name" value="'+getQueryVariable("name")+'"><button type="button" onclick="myFunction()">search</button>') ;
if (document.getElementById('name').value != "" && (document.getElementById('onModulename').checked||document.getElementById('onAuthor').checked||document.getElementById('onTime').checked||document.getElementById('onVer').checked))
{
for (i = 0 ; i < module.length ; i++)
{
if ((contain(module[i],getQueryVariable("name"))&&getQueryVariable("onModulename")=="checked")||(contain(author[i],getQueryVariable("name"))&&getQueryVariable("onAuthor")=="checked")||(contain(time[i],getQueryVariable("name"))&&getQueryVariable("onTime")=="checked")||(contain(latest[i],getQueryVariable("name"))&&getQueryVariable("onVer")=="checked"))
{
document.write('<h3><a href="https://144881-studios.github.io/pymodule/module/'+module[i]+'" style="text-decoration:none;color:#2040E0">'+module[i]+'</a></h3>') ;
document.write('<p>'+latest[i]+'('+time[i]+') by '+author[i]+'</p>') ;
}
}
document.write('<p>No more</p>') ;
}
else
{
document.write('<h1>Choose your search types and search.</h1>') ;
}
var isoIndex = {"Windows 98 Second Version":["win98_v2_zh_cn","4.1.x","installation","https://github.com/cheny0y0/windows-iso-source/releases/download/4.1.x/win98_v2_zh_cn.iso"]} ; // fullname:[filename,core_ver,type,url]
</script>
<h1>I'm making this page…</h1>
</body>
</html>