mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-18 13:42:06 +00:00
@ -112,8 +112,13 @@ export default createPlugin<
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const menu = document.querySelector('.detail-page-menu');
|
const menuParent = document.querySelector('#action-buttons')?.parentElement;
|
||||||
if (menu && !document.querySelector('.like-menu')) {
|
if (menuParent && !document.querySelector('.like-menu')) {
|
||||||
|
const menu = document.createElement('div');
|
||||||
|
menu.id = 'ytmd-album-action-buttons';
|
||||||
|
menu.className = 'action-buttons style-scope ytmusic-responsive-header-renderer';
|
||||||
|
|
||||||
|
menuParent.insertBefore(menu, menuParent.children[menuParent.children.length - 1]);
|
||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
menu.appendChild(button);
|
menu.appendChild(button);
|
||||||
button.addEventListener('click', this.loadFullList);
|
button.addEventListener('click', this.loadFullList);
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<button
|
<div class="style-scope">
|
||||||
|
<button
|
||||||
id="alldislike"
|
id="alldislike"
|
||||||
data-type="dislike"
|
data-type="dislike"
|
||||||
data-filled="false"
|
data-filled="false"
|
||||||
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
||||||
aria-pressed="false"
|
aria-pressed="false"
|
||||||
aria-label="Dislike all"
|
aria-label="Dislike all"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="yt-spec-button-shape-next__icon"
|
class="yt-spec-button-shape-next__icon"
|
||||||
style="color: var(--ytmusic-setting-item-toggle-active)"
|
style="color: var(--ytmusic-setting-item-toggle-active)"
|
||||||
@ -71,4 +72,5 @@
|
|||||||
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
||||||
</div>
|
</div>
|
||||||
</yt-touch-feedback-shape>
|
</yt-touch-feedback-shape>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<button
|
<div class="style-scope">
|
||||||
|
<button
|
||||||
id="alllike"
|
id="alllike"
|
||||||
data-type="like"
|
data-type="like"
|
||||||
data-filled="false"
|
data-filled="false"
|
||||||
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
||||||
aria-pressed="false"
|
aria-pressed="false"
|
||||||
aria-label="Like all"
|
aria-label="Like all"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="yt-spec-button-shape-next__icon"
|
class="yt-spec-button-shape-next__icon"
|
||||||
style="color: var(--ytmusic-setting-item-toggle-active)"
|
style="color: var(--ytmusic-setting-item-toggle-active)"
|
||||||
@ -71,4 +72,5 @@
|
|||||||
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
||||||
</div>
|
</div>
|
||||||
</yt-touch-feedback-shape>
|
</yt-touch-feedback-shape>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<button
|
<div class="style-scope">
|
||||||
|
<button
|
||||||
id="allundislike"
|
id="allundislike"
|
||||||
data-type="dislike"
|
data-type="dislike"
|
||||||
data-filled="true"
|
data-filled="true"
|
||||||
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
||||||
aria-pressed="false"
|
aria-pressed="false"
|
||||||
aria-label="Undislike all"
|
aria-label="Undislike all"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="yt-spec-button-shape-next__icon"
|
class="yt-spec-button-shape-next__icon"
|
||||||
style="color: var(--ytmusic-setting-item-toggle-active)"
|
style="color: var(--ytmusic-setting-item-toggle-active)"
|
||||||
@ -71,4 +72,5 @@
|
|||||||
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
||||||
</div>
|
</div>
|
||||||
</yt-touch-feedback-shape>
|
</yt-touch-feedback-shape>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<button
|
<div class="style-scope">
|
||||||
|
<button
|
||||||
id="allunlike"
|
id="allunlike"
|
||||||
data-type="like"
|
data-type="like"
|
||||||
data-filled="true"
|
data-filled="true"
|
||||||
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
class="like-menu yt-spec-button-shape-next yt-spec-button-shape-next--text yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-button"
|
||||||
aria-pressed="false"
|
aria-pressed="false"
|
||||||
aria-label="Unlike all"
|
aria-label="Unlike all"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="yt-spec-button-shape-next__icon"
|
class="yt-spec-button-shape-next__icon"
|
||||||
style="color: var(--ytmusic-setting-item-toggle-active)"
|
style="color: var(--ytmusic-setting-item-toggle-active)"
|
||||||
@ -71,4 +72,5 @@
|
|||||||
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
<div class="yt-spec-touch-feedback-shape__fill"></div>
|
||||||
</div>
|
</div>
|
||||||
</yt-touch-feedback-shape>
|
</yt-touch-feedback-shape>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user