mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
Fix Error Invalid Group Specifier Name on Safari by removing REGEX lookbehind group construct (fixes #239)
This commit is contained in:
parent
041261be2a
commit
2e15a018da
2 changed files with 19 additions and 3 deletions
|
@ -583,4 +583,14 @@ async function decodeBase64Text(base64) {
|
|||
if (!base64) throw new Error('Base64 is empty');
|
||||
|
||||
return decodeURIComponent(escape(window.atob(base64)))
|
||||
}
|
||||
|
||||
function isUrlValid(url) {
|
||||
try {
|
||||
let urlObj = new URL(url);
|
||||
return true;
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue