|
1 | 1 | // ==UserScript== |
2 | | -// @version 1.9.0 |
| 2 | +// @version 1.9.1 |
3 | 3 | // @name YouTube + |
4 | 4 | // @namespace https://github.com/ParticleCore |
5 | 5 | // @description YouTube with more freedom |
|
1629 | 1629 | } |
1630 | 1630 | } |
1631 | 1631 | list = list.reverse().splice(0, 20).join("%2C"); |
1632 | | - subPlaylist.list_title = subPlaylist.list_title && subPlaylist.list_title.querySelector(".epic-nav-item-heading").textContent.trim(); |
| 1632 | + subPlaylist.list_title = subPlaylist.list_title.textContent.trim(); |
1633 | 1633 | button = document.getElementById("subscription-playlist"); |
1634 | 1634 | button.href = "/watch_videos?title=" + subPlaylist.list_title + "&video_ids=" + list; |
1635 | 1635 | } |
1636 | 1636 | } |
1637 | 1637 | function subPlaylist() { |
1638 | | - var button, nav_menu; |
1639 | | - nav_menu = document.querySelector(".appbar-nav-menu"); |
| 1638 | + var button, browse_items; |
| 1639 | + browse_items = document.querySelector("#browse-items-primary"); |
1640 | 1640 | button = document.getElementById("subscription-playlist"); |
1641 | | - subPlaylist.list_title = document.querySelector(".appbar-nav-menu"); |
| 1641 | + subPlaylist.list_title = document.querySelector("#subscriptions-guide-item [href='/feed/subscriptions']"); |
1642 | 1642 | subPlaylist.video_list = document.getElementsByClassName("addto-watch-later-button"); |
1643 | | - if (user_settings.GEN_SUB_LIST && nav_menu && window.location.href.split("/feed/subscriptions").length > 1 && !button && subPlaylist.list_title && subPlaylist.video_list) { |
| 1643 | + if (user_settings.GEN_SUB_LIST && browse_items && window.location.href.split("/feed/subscriptions").length > 1 && !button && subPlaylist.list_title && subPlaylist.video_list) { |
1644 | 1644 | button = document.createElement("template"); |
1645 | 1645 | button.innerHTML = // |
1646 | | - `<li id='subscription-playlist-icon'> |
1647 | | - <a id='subscription-playlist' data-p='ttl|SUB_PLST' class='yt-uix-button spf-link yt-uix-sessionlink yt-uix-button-epic-nav-item yt-uix-button-size-default'> |
| 1646 | + `<div id='subscription-playlist-icon'> |
| 1647 | + <a id='subscription-playlist' data-p='ttl|SUB_PLST&tnd|SUB_PLST' class='spf-link'> |
1648 | 1648 | <svg viewBox='0 0 14 16'> |
1649 | 1649 | <polygon points='0,16 14,8 0,0 '/> |
1650 | 1650 | </svg> |
1651 | 1651 | </a> |
1652 | | - </li>`; |
| 1652 | + </div>`; |
1653 | 1653 | button = setLocale(button.content).firstChild; |
1654 | | - nav_menu.appendChild(button); |
| 1654 | + browse_items.parentNode.insertBefore(button, browse_items); |
1655 | 1655 | document.addEventListener("click", setSubPlaylist); |
1656 | 1656 | } |
1657 | 1657 | } |
|
2376 | 2376 | holder = document.createElement("link"); |
2377 | 2377 | holder.rel = "stylesheet"; |
2378 | 2378 | holder.type = "text/css"; |
2379 | | - holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.9.0"; |
| 2379 | + holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.9.1"; |
2380 | 2380 | document.documentElement.appendChild(holder); |
2381 | 2381 | } |
2382 | 2382 | holder = document.createElement("script"); |
|
0 commit comments