mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-02-13 04:49:36 +00:00
Added privatemode for mobile
This commit is contained in:
@@ -1467,7 +1467,7 @@ ul #chat-log{
|
|||||||
|
|
||||||
#player{
|
#player{
|
||||||
height:95%;
|
height:95%;
|
||||||
height: calc(100% - 32px);
|
height: calc(100%);
|
||||||
position: relative;
|
position: relative;
|
||||||
transform: translate(0%, 0%);
|
transform: translate(0%, 0%);
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
|||||||
4
public/dist/embed.min.js
vendored
4
public/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/dist/main.min.js
vendored
8
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -633,8 +633,9 @@ function change_offline(enabled, already_offline){
|
|||||||
$("#controls").on("mousemove", seekToMove);
|
$("#controls").on("mousemove", seekToMove);
|
||||||
$("#controls").on("click", seekToClick);
|
$("#controls").on("click", seekToClick);
|
||||||
$("#main_components").append("<div id='seekToDuration' class='hide'>00:00/01:00</div>");
|
$("#main_components").append("<div id='seekToDuration' class='hide'>00:00/01:00</div>");
|
||||||
$("#seekToDuration").css("top", $("#controls").position().top - 55);
|
if(!Helper.mobilecheck()) $("#seekToDuration").css("top", $("#controls").position().top - 55);
|
||||||
if(!$("#controls").hasClass("ewresize")) $("#controls").addClass("ewresize");
|
else if(Helper.mobilecheck()) $("#seekToDuration").css("top", $("#controls").position().top - 20);
|
||||||
|
if(!$("#controls").hasClass("ewresize")) $("#controls").addClass("ewresize");
|
||||||
} else {
|
} else {
|
||||||
$("#controls").off("mouseenter");
|
$("#controls").off("mouseenter");
|
||||||
$("#controls").off("mouseleave");
|
$("#controls").off("mouseleave");
|
||||||
@@ -675,6 +676,7 @@ function change_offline(enabled, already_offline){
|
|||||||
position: "bottom",
|
position: "bottom",
|
||||||
tooltip: "Enable private mode"
|
tooltip: "Enable private mode"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#controls").off("mouseleave");
|
$("#controls").off("mouseleave");
|
||||||
$("#controls").off("mouseenter");
|
$("#controls").off("mouseenter");
|
||||||
$("#controls").off("mousedown");
|
$("#controls").off("mousedown");
|
||||||
@@ -713,7 +715,8 @@ window.enable_debug = enable_debug;
|
|||||||
window.disable_debug = disable_debug;
|
window.disable_debug = disable_debug;
|
||||||
|
|
||||||
function seekToMove(e){
|
function seekToMove(e){
|
||||||
if(!Helper.mobilecheck()) {
|
//if(!Helper.mobilecheck()) {
|
||||||
|
console.log("hello");
|
||||||
var pos_x = e.clientX - Math.ceil($("#seekToDuration").width() / 2) - 8;
|
var pos_x = e.clientX - Math.ceil($("#seekToDuration").width() / 2) - 8;
|
||||||
if(pos_x < 0) pos_x = 0;
|
if(pos_x < 0) pos_x = 0;
|
||||||
else if(pos_x + $("#seekToDuration").width() > $("#controls").width()) {
|
else if(pos_x + $("#seekToDuration").width() > $("#controls").width()) {
|
||||||
@@ -734,13 +737,13 @@ function seekToMove(e){
|
|||||||
$("#bar").width(((100 / Player.player.getDuration()) * total) + "%");
|
$("#bar").width(((100 / Player.player.getDuration()) * total) + "%");
|
||||||
}
|
}
|
||||||
} catch(e){}
|
} catch(e){}
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
function seekToClick(e){
|
function seekToClick(e){
|
||||||
var acceptable = ["bar", "controls", "duration"];
|
var acceptable = ["bar", "controls", "duration"];
|
||||||
|
|
||||||
if(acceptable.indexOf($(e.target).attr("id")) >= 0 && !Helper.mobilecheck()) {
|
if(acceptable.indexOf($(e.target).attr("id")) >= 0) {
|
||||||
var total = full_playlist[full_playlist.length - 1].duration / $("#controls").width();
|
var total = full_playlist[full_playlist.length - 1].duration / $("#controls").width();
|
||||||
total = total * e.clientX;
|
total = total * e.clientX;
|
||||||
|
|
||||||
@@ -1360,7 +1363,8 @@ $(window).resize(function(){
|
|||||||
$(".list-song").css("height", List.element_height + "px");
|
$(".list-song").css("height", List.element_height + "px");
|
||||||
$("#player_overlay").width($("#player").width()+1);
|
$("#player_overlay").width($("#player").width()+1);
|
||||||
set_title_width();
|
set_title_width();
|
||||||
if($("#controls").length > 0) $("#seekToDuration").css("top", $("#controls").position().top - 55);
|
if($("#controls").length > 0 && !Helper.mobilecheck()) $("#seekToDuration").css("top", $("#controls").position().top - 55);
|
||||||
|
else if($("#controls").length > 0) $("#seekToDuration").css("top", $("#controls").position().top - 20);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="no-padding offline-panel hide-on-small-only">
|
<li class="no-padding offline-panel">
|
||||||
<ul class="collapsible collapsible-accordion">
|
<ul class="collapsible collapsible-accordion">
|
||||||
<li>
|
<li>
|
||||||
<a class="collapsible-header bold waves-effect">Private Mode
|
<a class="collapsible-header bold waves-effect">Private Mode
|
||||||
|
|||||||
Reference in New Issue
Block a user