mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-13 09:28:50 +01:00
Port domain format from Trending
This commit is contained in:
parent
8c8ff72e53
commit
7ad6151637
1 changed files with 3 additions and 1 deletions
|
@ -1714,7 +1714,9 @@ function Card({ card, instance }) {
|
|||
if (snapStates.unfurledLinks[url]) return null;
|
||||
|
||||
if (hasText && (image || (type === 'photo' && blurhash))) {
|
||||
const domain = new URL(url).hostname.replace(/^www\./, '');
|
||||
const domain = new URL(url).hostname
|
||||
.replace(/^www\./, '')
|
||||
.replace(/\/$/, '');
|
||||
let blurhashImage;
|
||||
if (!image) {
|
||||
const w = 44;
|
||||
|
|
Loading…
Reference in a new issue