mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-31 13:43:41 +03:00
Prevent embeds from playing inline
This commit is contained in:
parent
cef4e6373e
commit
d8b0adfe97
2 changed files with 10 additions and 1 deletions
|
@ -1609,6 +1609,11 @@ a.card:is(:hover, :focus):visited {
|
||||||
.card.video {
|
.card.video {
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
max-height: 320px;
|
max-height: 320px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
lite\-youtube {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.card.video iframe {
|
.card.video iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -2181,7 +2181,11 @@ function Card({ card, selfReferential, instance }) {
|
||||||
// Get ID from e.g. https://www.youtube.com/watch?v=[VIDEO_ID]
|
// Get ID from e.g. https://www.youtube.com/watch?v=[VIDEO_ID]
|
||||||
const videoID = url.match(/watch\?v=([^&]+)/)?.[1];
|
const videoID = url.match(/watch\?v=([^&]+)/)?.[1];
|
||||||
if (videoID) {
|
if (videoID) {
|
||||||
return <lite-youtube videoid={videoID} nocookie></lite-youtube>;
|
return (
|
||||||
|
<a class="card video" onClick={handleClick}>
|
||||||
|
<lite-youtube videoid={videoID} nocookie></lite-youtube>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// return (
|
// return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue