MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / isValidWsUrl

Function isValidWsUrl

extension/options.js:25–32  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

23}
24
25function isValidWsUrl(value) {
26 try {
27 const url = new URL(value);
28 return url.protocol === "ws:" || url.protocol === "wss:";
29 } catch (e) {
30 return false;
31 }
32}
33
34function loadSettings() {
35 chrome.storage.local.get(DEFAULT_SETTINGS, (stored) => {

Callers 1

saveSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected