Rename URL validation util function

This commit is contained in:
Cohee
2023-10-16 00:50:29 +03:00
parent 0f15d2d45b
commit 5b954a3584
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import { saveSettingsDebounced } from "../script.js";
import { power_user } from "./power-user.js";
import { isUrlOrAPIKey } from "./utils.js";
import { isValidUrl } from "./utils.js";
/**
* @param {{ term: string; }} request
@@ -64,7 +64,7 @@ function onServerConnectClick() {
const value = String($(`[data-server-history="${serverLabel}"]`).val()).toLowerCase().trim();
// Don't save empty values or invalid URLs
if (!value || !isUrlOrAPIKey(value)) {
if (!value || !isValidUrl(value)) {
return;
}