File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,11 @@ const hoverLinks = ($video) => {
396396 $link . addEventListener ( 'mouseover' , ( e ) => {
397397 e . stopPropagation ( ) ;
398398 $hoverLink . textContent = url ;
399+ // Place the link on the right side if the mouse is close to
400+ // the lower left side of the window.
401+ $hoverLink . classList . toggle ( 'right' ,
402+ window . innerHeight - e . clientY < VIDEO_HEIGHT &&
403+ e . clientX < window . innerWidth / 2 ) ;
399404 document . body . append ( $hoverLink ) ;
400405 } ) ;
401406 $link . addEventListener ( 'mouseleave' , ( ) => {
Original file line number Diff line number Diff line change @@ -509,3 +509,9 @@ a.close[data-title]:hover:after {
509509 line-height : 15px ;
510510 z-index : 99 ;
511511}
512+
513+ .mouseover-link .right {
514+ left : unset;
515+ right : 0 ;
516+ max-width : 50% ;
517+ }
You can’t perform that action at this time.
0 commit comments