mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 17:25:40 +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 {
|
||||
max-width: 320px;
|
||||
max-height: 320px;
|
||||
cursor: pointer;
|
||||
|
||||
lite\-youtube {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.card.video iframe {
|
||||
width: 100%;
|
||||
|
|
|
@ -2181,7 +2181,11 @@ function Card({ card, selfReferential, instance }) {
|
|||
// Get ID from e.g. https://www.youtube.com/watch?v=[VIDEO_ID]
|
||||
const videoID = url.match(/watch\?v=([^&]+)/)?.[1];
|
||||
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 (
|
||||
|
|
Loading…
Reference in a new issue