Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions js/common/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ function makeUrl(url, extraParams = {}) {
return new URL(oldUrl) + buildHash(urlParams);
}

// Check if the current url is a valid CircuitPython Web Workflow local device name
// Check for any local MDNS name, not limited to Circuitpython default names
function isMdns() {
// Check for cpy-XXXXXX.local (and optionally cpy-XXXXXX-###.local for mDNS name resolution)
return location.hostname.search(/cpy-[0-9a-f]{6}(?:-[0-9]+)?.local/gi) == 0;
return location.hostname.endsWith(".local");
}

// Check if the current url is an IP address
Expand Down
Loading