MCPcopy Index your code
hub / github.com/SnapDrop/snapdrop / isURL

Function isURL

client/scripts/ui.js:3–3  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1const $ = query => document.getElementById(query);
2const $$ = query => document.body.querySelector(query);
3const isURL = text => /^((https?:\/\/|www)[^\s]+)/g.test(text.toLowerCase());
4window.isDownloadSupported = (typeof document.createElement('a').download !== 'undefined');
5window.isProductionEnvironment = !window.location.host.startsWith('localhost');
6window.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;

Callers 2

_onTextMethod · 0.85
_messageNotificationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected