@@ -58,6 +58,11 @@ const REST_SHORTS_CONTAINERS_TAG = isMobile ? [
5858 [ "ytd-compact-video-renderer" ] ,
5959] . join ( "," )
6060
61+
62+ /* ON MOBILE */
63+ // videos in ytm-rich-section-renderer on Home page
64+ const mHidingVideoRenderer = new HidingShortsWithContainer ( "ytm-shorts-lockup-view-model" , "ytm-rich-section-renderer" ) ;
65+
6166/* ON DESKTOP */
6267const dOperationsAfterHidingElement = new OperationsAfterHidingElement ( ) ;
6368// hiding videos on Search page, videos in list mode on subscription page
@@ -240,6 +245,7 @@ function setup() {
240245
241246 combinedSelectorsToQuery = REST_SHORTS_CONTAINERS_TAG ;
242247 if ( isMobile ) {
248+ combinedSelectorsToQuery += "," + mHidingVideoRenderer . elementTagName
243249 hideShortsCallbackInner =
244250 hidingShortsTimeoutActive ?
245251 ( ) => {
@@ -384,6 +390,17 @@ function hideShorts(hide = true) {
384390 else
385391 dHideVideoRendererSubscriptionPage . showShort ( element ) ;
386392 }
393+ else if ( isMobile === true
394+ && location . pathname . match ( hidingShortsOnPathNames . homePage . reg )
395+ && elementTagName . match ( mHidingVideoRenderer . elementTagName ) )
396+ {
397+ if ( hide ) {
398+ mHidingVideoRenderer . hideShort ( element ) ;
399+ }
400+ else {
401+ mHidingVideoRenderer . showShort ( element ) ;
402+ }
403+ }
387404 // other pages with containers on search page
388405 else if ( elementTagName . match ( dHidingVideoRenderer . elementTagName ) ) {
389406 if ( hide ) {
@@ -393,7 +410,7 @@ function hideShorts(hide = true) {
393410 dHidingVideoRenderer . showShort ( element ) ;
394411 }
395412 }
396- // hide whole shelf if just contains "ytd -reel-item-renderer" tag. For now seems to be only used for yt-shorts videos
413+ // hide whole shelf if just contains "yt[dm] -reel-item-renderer" tag. For now seems to be only used for yt-shorts videos
397414 // and hide any video container that contains a ref link to shorts
398415 else if ( ( elementTagName . match ( SHELF_TAG_REGEX )
399416 && element . querySelector ( SHELF_ITEM_TAG_SELECTOR ) != null )
0 commit comments