File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 143143 < input type ="text " id ="searchInput " placeholder ="Search within HackTricks... " />
144144 < div class ="buttons ">
145145 < button type ="submit " name ="engine " value ="bing "> Search with Bing</ button >
146- < button type ="submit " name ="engine " value ="google "> Search with Google </ button >
146+ < button type ="submit " name ="engine " value ="hacktricks "> Search inside HackTricks </ button >
147147 </ div >
148148</ form >
149149
@@ -155,10 +155,12 @@ <h1>
155155 const filter = 'site:hacktricks.xyz' ;
156156
157157 let actionUrl ;
158- if ( engine === 'google' ) {
159- actionUrl = 'https://www.google.com/search' ;
158+ if ( engine === 'hacktricks' ) {
159+ actionUrl = 'https://book.hacktricks.wiki/en/index.html' ;
160+ input_name = 'search' ;
160161 } else {
161162 actionUrl = 'https://www.bing.com/search' ;
163+ input_name = 'q' ;
162164 }
163165
164166 // Create a hidden form to submit to the appropriate engine
168170
169171 const input = document . createElement ( 'input' ) ;
170172 input . type = 'hidden' ;
171- input . name = 'q' ;
173+ input . name = input_name ;
172174 input . value = filter + ' ' + userQuery ;
173175 form . appendChild ( input ) ;
174176
You can’t perform that action at this time.
0 commit comments