#44: Enable end-users to filter path for searches
This commit is contained in:
@@ -13,7 +13,8 @@ Access raw data with: <?php echoUrl('channels/'); ?>.<br/>
|
||||
Access found channels with: <?php echoUrl('channels.txt'); ?>.
|
||||
|
||||
<form id="form">
|
||||
<input type="text" autofocus id="search" placeholder="Your search"></input>
|
||||
<input type="text" autofocus id="search" size="23" placeholder="Your search"></input><br/>
|
||||
<input type="text" autofocus id="path-search" size="23" placeholder="In path containing (default: *empty*)"></input><br/>
|
||||
<input type="submit" id="search" value="Search">
|
||||
<input type="submit" id="search-only-captions" value="Search only captions">
|
||||
</form>
|
||||
@@ -82,7 +83,7 @@ Progress: <span id="progress"></span> channels
|
||||
function search(event) {
|
||||
// We don't want to refresh the webpage which is the default behavior.
|
||||
event.preventDefault();
|
||||
const query = event.submitter.id + ' ' + document.getElementById('search').value;
|
||||
const query = event.submitter.id + ' ' + document.getElementById('path-search').value + ' ' + document.getElementById('search').value;
|
||||
if (firstRun) {
|
||||
firstRun = false;
|
||||
conn = new WebSocket('wss://crawler.yt.lemnoslife.com/websocket');
|
||||
|
Reference in New Issue
Block a user