File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 142
142
< form id ="searchForm ">
143
143
< input type ="text " id ="searchInput " placeholder ="Search within HackTricks... " />
144
144
< div class ="buttons ">
145
+ < button type ="submit " name ="engine " value ="hacktricks "> Search in HackTricks</ button >
145
146
< button type ="submit " name ="engine " value ="bing "> Search with Bing</ button >
146
- < button type ="submit " name ="engine " value ="hacktricks "> Search inside HackTricks</ button >
147
147
</ div >
148
148
</ form >
149
149
@@ -158,9 +158,11 @@ <h1>
158
158
if ( engine === 'hacktricks' ) {
159
159
actionUrl = 'https://book.hacktricks.wiki/en/index.html' ;
160
160
input_name = 'search' ;
161
+ input_value = userQuery ;
161
162
} else {
162
163
actionUrl = 'https://www.bing.com/search' ;
163
164
input_name = 'q' ;
165
+ input_value = filter + ' ' + userQuery ;
164
166
}
165
167
166
168
// Create a hidden form to submit to the appropriate engine
171
173
const input = document . createElement ( 'input' ) ;
172
174
input . type = 'hidden' ;
173
175
input . name = input_name ;
174
- input . value = filter + ' ' + userQuery ;
176
+ input . value = input_value ;
175
177
form . appendChild ( input ) ;
176
178
177
179
document . body . appendChild ( form ) ;
You can’t perform that action at this time.
0 commit comments