Update script.js

This commit is contained in:
Levy,Wang 2025-03-11 17:52:09 +08:00 committed by GitHub
parent 8f2aad1653
commit feee2c2358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)) {