mirror of
https://github.com/levywang/avhub.git
synced 2026-02-21 08:47:22 +08:00
Update script.js
This commit is contained in:
parent
8f2aad1653
commit
feee2c2358
@ -61,7 +61,7 @@ const API_CONFIG = {
|
||||
|
||||
async function searchMagnet() {
|
||||
|
||||
const input = document.getElementById('searchInput');
|
||||
const input = document.getElementById('searchInput').value.replace(/\s+/g, '');
|
||||
|
||||
const resultsDiv = document.getElementById('searchResults');
|
||||
|
||||
@ -71,7 +71,7 @@ async function searchMagnet() {
|
||||
|
||||
const container = document.getElementById('coverImageContainer');
|
||||
|
||||
const regex = /^[a-zA-Z][a-zA-Z0-9-]*\d$/;
|
||||
const regex = /^[A-Za-z][\w\s]*\d$/;
|
||||
|
||||
if (!searchTerm || !regex.test(searchTerm)) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user