feat: add more images for product
This commit is contained in:
parent
73016c2ce9
commit
d032c8b259
8 changed files with 51 additions and 73 deletions
|
|
@ -111,3 +111,13 @@ function timeFromNow(time) {
|
|||
// Return time from now data
|
||||
return `${tfn.time} ${tfn.unitOfTime}`
|
||||
}
|
||||
|
||||
function isValidImageUrl(string) {
|
||||
let url
|
||||
try {
|
||||
url = new URL(string)
|
||||
} catch (_) {
|
||||
return false
|
||||
}
|
||||
return url.protocol === 'http:' || url.protocol === 'https:'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue