#31: Add a first search only captions support
This commit is contained in:
@@ -13,7 +13,8 @@ Access raw data with: <?php echoUrl('channels/'); ?>.
|
||||
|
||||
<form id="form">
|
||||
<input type="text" autofocus id="search" pattern="[A-Za-z0-9-_ ]+" placeholder="Your [A-Za-z0-9-_ ]+ search"></input>
|
||||
<input type="submit" value="Search">
|
||||
<input type="submit" id="search" value="Search">
|
||||
<input type="submit" id="search-only-captions" value="Search only captions">
|
||||
</form>
|
||||
|
||||
<ul id="channels">
|
||||
@@ -64,7 +65,7 @@ Access raw data with: <?php echoUrl('channels/'); ?>.
|
||||
function search(event) {
|
||||
// We don't want to refresh the webpage which is the default behavior.
|
||||
event.preventDefault();
|
||||
const query = document.getElementById('search').value;
|
||||
const query = event.submitter.id + ' ' + document.getElementById('search').value;
|
||||
if (firstRun) {
|
||||
firstRun = false;
|
||||
conn = new WebSocket('wss://crawler.yt.lemnoslife.com/websocket');
|
||||
|
Reference in New Issue
Block a user