Added so that clicking video in frontpage moves user to the channel

This commit is contained in:
Kasper Rynning-Tønnesen
2016-05-11 14:00:17 +02:00
parent 0221cfaa6c
commit db7e3c9269
5 changed files with 21 additions and 10 deletions

View File

@@ -83,13 +83,18 @@
position: fixed;
bottom: 175px;
right: 20px;
z-index: 11;
z-index: 101;
font-size: 18px;
color: white;
text-shadow: 0px 0px 2px black;
cursor:pointer;
}
#player_bottom_overlay{
z-index: 100;
cursor: pointer;
}
.frontpage_modified_heights{
height: 0px !important;
margin-bottom:0px !important;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -544,10 +544,14 @@ $(document).on("click", ".brand-logo-navigate", function(e){
onepage_load();
});
$(document).on("click", "#player_bottom_overlay", function(){
Nochan.to_channel(chan.toLowerCase(), false);
});
$(document).on("mousemove", "#playlist", function(e)
{
var y = e.pageY - this.offsetTop;
if(((y <= 27 && adminpass == "") || (y <= 80 && y >= 48 && adminpass != "")) && $("#wrapper").scrollTop() > 0){
if(((y <= 80 && y >= 48)) && $("#wrapper").scrollTop() > 0){
$("#top-button").removeClass("hide");
Helper.addClass("#bottom-button", "hide");
}else if(y >= $("#playlist").height() - 18 && $("#wrapper").scrollTop() < $("#wrapper")[0].scrollHeight - $("#wrapper").height() - 1){
@@ -634,7 +638,7 @@ function onepage_load(){
$("meta[name=theme-color]").attr("content", "#2D2D2D");
if(!Helper.mobilecheck()){
$("main").append("<a id='closePlayer'>X</a>");
$("main").append("<a id='closePlayer' title='Close Player'>X</a>");
$("#playbar").remove();
$("#playlist").remove();
$(".ui-resizable-handle").remove();
@@ -643,9 +647,11 @@ function onepage_load(){
$("#main-row").addClass("frontpage_modified_heights");
$("#player").css("opacity", "1");
$("#video-container").removeClass("no-opacity");
$("#main-row").prepend("<div id='player_bottom_overlay' title='To Channel' class='ytplayer player_bottom'></div>");
} else {
Player.ytplayer.destroy();
Player.ytplayer = "";
document.title = "Zöff";
}
$(".drag-target").remove();
@@ -662,6 +668,7 @@ function onepage_load(){
$(".page-footer").removeClass("padding-bottom-novideo");
$("#favicon").attr("href", "static/images/favicon.png");
if($("#alreadyfp").length == 1){
initfp();
}else {
@@ -675,8 +682,6 @@ function onepage_load(){
}
$("#channel-load").css("display", "none");
document.title = "Zöff";
}
});
}

View File

@@ -257,13 +257,14 @@ var Nochan = {
$("main").html($($(e)[65]).html());
} else {
var main = $($($($($(e)[65]).html())[0]).html());
$("#main-row").append($(main[2]).clone().wrap("<div>").parent().html());
$("#video-container").append($($($(main[0]).html())[4]).clone().wrap("<div>").parent().html());
$("#main-row").append($(main[2]).wrap("<div>").parent().html());
$("#video-container").append($($($(main[0]).html())[4]).wrap("<div>").parent().html());
$("#main-row").append("<div id='playbar'></div>");
$("#player").removeClass("player_bottom");
$("#main-row").removeClass("frontpage_modified_heights");
$("#main_section_frontpage").remove();
$("#closePlayer").remove();
$("#player_bottom_overlay").remove();
}
$("#search").attr("placeholder", "Find song on YouTube...");
$(".page-footer").addClass("padding-bottom-novideo");