Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

Breaks other scripts/links

About: YouTube View Most Popular and Newest Uploader Videos (2018+)

For some reason this version vs your much smaller jquery version breaks the "add to" and other buttons. When this script is disabled, obviously your two buttons just to the right of the "add to..." disappear, but then also all other buttons return to working.

Otherwise, very nice job and love the push dropdown effect!

Bình luận

  • Sorry should have clarified better, it's actually just the buttons in the SAME row that your two get injected into that no longer function...the others on the page are ok.

  • đã sửa July 2018 Chrome

    yeah, the smaller jquery version trick unfortunately was removed by YouTube and I was trying to make a replacement.. but yeah, hmm for the latest script I guess I should clarify that happens, I haven't been able to figure out a way to make everything work, frustrating... I kind of just posted the script in case people are hopefully ok with no 'Add to..." as I never really use it myself, but if I fix it I'll post an update

  • Found the issue, it's from line 471 that does:

    $(".yt-ui-menu-content").remove();

    That removal takes with it all the other buttons on that row. Remming out that line appears to make it all work including your buttons, so I'm not clear on exactly what you were removing that class for. Care to enlighten me I'm sure its probably something obvious I'm just overlooking right now.

    TIA!

  • ah nice find, it's probably leftover from earlier experimentation, hopefully this will fix it, I'll add an update, cheers

  • Also, just a suggestion but for those that also have other scripts running including theming youtube, you might consider instead of forcing a new class for your 2 buttons of:

    btn btn-default pull-left

    Instead keep them the default YT class so they are automatically themed appropriately with (lines 487 & 499) to this instead:

    'class': "yt-uix-button yt-uix-button-size-default",

    Which in my testing renders them in any other theme I select while keeping them functional however there is also a pretty major layout issue I failed to mention above.

    These changes below fix that as well.

    Change Line 35 to:
    var dest2 = $('button#action-panel-overflow-button');

    Change Lines 38 and 39 to (insert AFTER instead):
    $('<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-has-icon no-icon-markup pause-resume-autoplay yt-uix-menu-triggerx yt-uix-tooltip addto-button" type="button" title="More actions" aria-pressed="false" id="popular" role="button" aria-haspopup="false" data-tooltip-text="Popular videos" aria-labelledby="yt-uix-tooltip93-arialabel"><span class="yt-uix-button-content"><a href="' + link + '">Most popular videos</a></span></button>').insertAfter(dest2).css('color', '#666');
    $('<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-has-icon no-icon-markup pause-resume-autoplay yt-uix-menu-triggerx yt-uix-tooltip addto-button" type="button" title="More actions" aria-pressed="false" id="newest" role="button" aria-haspopup="false" data-tooltip-text="Newest videos" aria-labelledby="yt-uix-tooltip93-arialabel"><span class="yt-uix-button-content"><a href="' + linkdd + '">Newest videos</a></span></button>').insertAfter(dest2).css('color', '#666');

    And the layout is then perfect, other than the "More.." button which YT in it's infinite wisdom made expandable, so it's a tad wider but your 2 now appear perfectly to the right of the more, whereas your elements with the SPAN was instead overlapping riding on top.

    Hope all of this helps if it does feel free to give me a shoutout in the credits. TIA!

  • FYI, I was wrong the helper script from Artain simply does not work properly (for a couple reasons) and as such, forces the refresh/reload just after you create the new dropdown, forcing that iframe to take over the entire tab, losing the video page all together.

    Feel free to use mine on GF here at:
    https://greasyfork.org/en/scripts/370052-youtube-old-site-design

    Either way, only when I totally REM out his broken old youtube script that you just added to yours and use mine instead, does the cookie get checked/set properly but ignored once set and then allows your script to create the new dropdown with no bad refreshes.

Đăng nhập hoặc Đăng ký để gửi bình luận.