Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Fixed bug for legacy layout button display
Browse files Browse the repository at this point in the history
  • Loading branch information
Wassup789 committed Nov 18, 2017
1 parent dfdc5f3 commit 502b4c9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions js/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,21 @@ function launchLegacy(){
}
}else if($(".ytn-btn").length < 1){// For everything else
$(".yt-uix-overlay").each(function(){
var $this = $(this);
if(
$(this).hasClass("channel-settings-overlay") ||
$(this).hasClass("featured-content-picker-overlay") ||
$(this).hasClass("settings-dialog-container") ||
$this.hasClass("channel-settings-overlay") ||
$this.hasClass("featured-content-picker-overlay") ||
$this.hasClass("settings-dialog-container") ||
$(".about-metadata-container").find(this).length > 0 ||
$(this).parent().hasClass("channel-header-flagging-menu-container"))
$this.parent().hasClass("channel-header-flagging-menu-container") ||
$this.parents(".primary-header-actions").find(".ytn-btn").length > 0)
return;
else{
if($(".primary-header-actions").find(this).length > 0){
if($this.parents(".primary-header-actions").length > 0){
var elem2 = elem.replace("float: initial", "float: right");
$(".primary-header-actions").prepend(elem2);
$this.parents(".primary-header-actions").prepend(elem2);
}else
$(elem).insertBefore($(this));
$(elem).insertBefore($this);
}
});

Expand Down

0 comments on commit 502b4c9

Please sign in to comment.