From 939096b622cda34ae25b1fa0531dd85f4a03a25c Mon Sep 17 00:00:00 2001 From: Tandashi <18377875+Tandashi@users.noreply.github.com> Date: Sat, 22 Jan 2022 04:36:35 +0100 Subject: [PATCH] fix: Playlist Add button appeard only after resize to mobile --- src/plugin.ts | 1 - src/util/consts.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index 5eb3e0c..ae9b2a1 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -198,7 +198,6 @@ function injectButton( const container = $(containerSelector); $(`ytd-button-renderer#${id}`).remove(); if (container.length === 1 && container.find(`#${id}`).length === 0) { - console.log(`ytd-button-renderer#${id}`); injectYtRenderedButton(container, insertAfter, id, text, icon, cb); clearInterval(handler); } diff --git a/src/util/consts.ts b/src/util/consts.ts index 7d29374..5bba93d 100644 --- a/src/util/consts.ts +++ b/src/util/consts.ts @@ -12,7 +12,7 @@ export const NON_PLAYLIST_CONTAINER_SELECTOR = 'div#secondary div#secondary-inne export const VIDEO_INFO_BUTTON_INJECT_CONTAINER_SELECTOR = 'div#primary > div#primary-inner > div#info > div#info-contents > ytd-video-primary-info-renderer > div#container > div#info ytd-menu-renderer'; export const VIDEO_PLAYLIST_BUTTON_INJECT_CONTAINER_SELECTOR = - 'div#primary ytd-playlist-panel-renderer div#playlist-actions > div#end-actions'; + 'div#secondary ytd-playlist-panel-renderer div#playlist-actions > div#end-actions'; export const PLAYLIST_PLAYLIST_BUTTON_INJECT_CONTAINER_SELECTOR = 'ytd-playlist-sidebar-primary-info-renderer div#menu'; export const Reactions: Reaction[] = [