281 unfurl show links #303
1 changed files with 2 additions and 2 deletions
|
@ -48,9 +48,9 @@ function clientAcceptsHtml ({accept}) {
|
||||||
return accept && accept.match(/text\/html/);
|
return accept && accept.match(/text\/html/);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clientWantsAsset ({accept}) {
|
function clientWantsAsset ({accept, range}) {
|
||||||
const imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/) && !accept.match(/text\/\*/); // checks if an image is accepted, but not a video
|
const imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/) && !accept.match(/text\/\*/); // checks if an image is accepted, but not a video
|
||||||
const videoIsWanted = false;
|
const videoIsWanted = accept && range;
|
||||||
return imageIsWanted || videoIsWanted;
|
return imageIsWanted || videoIsWanted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue