-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
156 lines (132 loc) · 4.25 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
<!--
copyright (c) 2009 Google inc.
You are free to copy and use this sample.
License can be found here: http://code.google.com/apis/ajaxsearch/faq/#license
Kacey Coughlin
Roodle Search Engine
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>ROODLE</title>
<style type="text/css">
body *, table *,
body {
font-family: "trebuchet ms", verdana, sans-serif;
font-size: 13px;
}
#search_control { margin: 20px; }
#title {
margin: 0 auto;
position: absolute;
top: 0;
z-index: 100;
width: 100%;
height: 200px;
padding: 3px;
text-align: center;
background-color: #ffffff;
}
#search {
margin: 0 auto;
margin-top: 150px;
width: 100%;
}
#search input[type=text] {
margin: 0 auto;
border-color: #333333;
width: 300px;
height: 30px;
display: block;
padding: 2px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
#search input[type=button], input[type=reset] {
width: 60px;
height: 25px;
background-color: #ffffff;
border-color: #333333;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
</style>
<!-- Replace with http://www.google.com/jsapi -->
<script src="http://www.google.com/jsapi?key=ABQIAAAARMDkdNKAyO_Jhlq1-QsKfxSpW8hn5bEzQGkM9ZY1EcTTlChRcRRvJC61uoSS1WQBtmXcLDPPODTpLA" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">//<![CDATA[
google.load('search', '1');
function search() {
//Get search term
var term = document.getElementById("searchBox").value;
// create a search control
var searchControl = new google.search.SearchControl();
// web search, open, alternate root
var options = new google.search.SearcherOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
options.setRoot(document.getElementById("somewhere_else"));
searchControl.addSearcher(new google.search.WebSearch(), options);
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("search_control"));
//Create string array
var sArray = [];
sArray[0] = "sexy sex";
sArray[1] = "boobs and butt";
sArray[2] = "poops in pants";
sArray[3] = "in a toilet";
sArray[4] = "and lolcats";
sArray[5] = "with long butt hairs";
sArray[6] = "to have sex with";
sArray[7] = "for pooping in";
sArray[8] = "when I pee";
sArray[9] = "to shave back hair";
//Create random number to pick array index
var randomNumber = function (min,max,digits) {
digits = isNaN(digits) ? 0 : parseInt(digits);
//Make sure number is between 0 and 4
if (digits < 0) {
digits = 0;
} else if (digits > 10) {
digits = 10;
}
if (digits == 0) {
return Math.floor(Math.random()*(max-min+1))+min;
} else {
var rand = Math.random() + (max-min)+min;
return parseFloat(rand.toFixed(digits));
}
}
var rand = randomNumber(0,10);
// execute search
searchControl.execute(term+" "+sArray[rand]);
}
google.setOnLoadCallback(OnLoad);
//]]>
</script>
</head>
<body>
<div id="title" align="center">
<img src="http://www.kaceycoughlin.com/Roodle/roodle.jpg" />
</div>
<table width="100%">
<tr>
<td valign="top" align="center">
<div id="search_control">Loading...</div>
</td>
</tr><tr>
<td valign="top" align="center">
<div id="search">
<input type="text" size="40" id="searchBox" onkeydown="if((13==event.keycode)||(13==event.which)){search();}" /><br>
<input type="button" value="Search" onclick="search();" />
<input type="reset" value="Reset" />
</div>
</td>
</tr><tr>
<td valign="top">
<div id="somewhere_else">
<font color="white">Loading</font>
</div>
</td>
</tr>
</table>
</body>
</html>