Skip to content

Commit 2a843ce

Browse files
committed
fix
1 parent 33458f8 commit 2a843ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ <h1>
142142
<form id="searchForm">
143143
<input type="text" id="searchInput" placeholder="Search within HackTricks..." />
144144
<div class="buttons">
145+
<button type="submit" name="engine" value="hacktricks">Search in HackTricks</button>
145146
<button type="submit" name="engine" value="bing">Search with Bing</button>
146-
<button type="submit" name="engine" value="hacktricks">Search inside HackTricks</button>
147147
</div>
148148
</form>
149149

@@ -158,9 +158,11 @@ <h1>
158158
if (engine === 'hacktricks') {
159159
actionUrl = 'https://book.hacktricks.wiki/en/index.html';
160160
input_name = 'search';
161+
input_value = userQuery;
161162
} else {
162163
actionUrl = 'https://www.bing.com/search';
163164
input_name = 'q';
165+
input_value = filter + ' ' + userQuery;
164166
}
165167

166168
// Create a hidden form to submit to the appropriate engine
@@ -171,7 +173,7 @@ <h1>
171173
const input = document.createElement('input');
172174
input.type = 'hidden';
173175
input.name = input_name;
174-
input.value = filter + ' ' + userQuery;
176+
input.value = input_value;
175177
form.appendChild(input);
176178

177179
document.body.appendChild(form);

0 commit comments

Comments
 (0)