mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Added video-only option for embedded channel
This commit is contained in:
@@ -74,6 +74,7 @@ $(document).ready(function() {
|
||||
$("#playlist").addClass("hide");
|
||||
$("#controls").addClass("hide");
|
||||
$("#player").addClass("video_only");
|
||||
$("#zoffbutton").css("bottom", "0px");
|
||||
}
|
||||
|
||||
$("#locked_channel").modal({
|
||||
|
||||
@@ -215,8 +215,8 @@ function disable_debug(){
|
||||
localStorage.debug = false;
|
||||
}
|
||||
|
||||
function embed_code(autoplay, width, height, color){
|
||||
return '<iframe src="https://zoff.me/_embed#' + chan.toLowerCase() + '&' + color + autoplay + '" width="' + width + 'px" height="' + height + 'px"></iframe>';
|
||||
function embed_code(autoplay, width, height, color, embed_code){
|
||||
return '<iframe src="https://zoff.me/_embed#' + chan.toLowerCase() + '&' + color + autoplay + embed_videoonly + '" width="' + width + 'px" height="' + height + 'px"></iframe>';
|
||||
}
|
||||
|
||||
function change_offline(enabled, already_offline){
|
||||
|
||||
@@ -53,6 +53,7 @@ var not_import_html = "";
|
||||
var not_export_html = "";
|
||||
var embed_height = 300;
|
||||
var embed_width = 600;
|
||||
var embed_videoonly = "";
|
||||
var embed_autoplay = "&autoplay";
|
||||
var connect_error = false;
|
||||
var access_token_data_youtube = {};
|
||||
@@ -617,19 +618,19 @@ $(document).on('change', '#view_channels_select', function(e) {
|
||||
$(document).on('keyup mouseup', '#width_embed', function(){
|
||||
var that = $(this);
|
||||
embed_width = that.val();
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly));
|
||||
});
|
||||
|
||||
$(document).on('keyup mouseup', '#height_embed', function(){
|
||||
var that = $(this);
|
||||
embed_height = that.val();
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly));
|
||||
});
|
||||
|
||||
$(document).on('input', '#color_embed', function(){
|
||||
var that = $(this);
|
||||
color = that.val().substring(1);
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly));
|
||||
});
|
||||
|
||||
$(document).on('click', ".chan-link", function(e){
|
||||
@@ -778,7 +779,13 @@ $(window).focus(function(){
|
||||
$(document).on("change", "#autoplay", function() {
|
||||
if(this.checked) embed_autoplay = "&autoplay";
|
||||
else embed_autoplay = "";
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly));
|
||||
});
|
||||
|
||||
$(document).on("change", "#videoonly", function() {
|
||||
if(this.checked) embed_videoonly = "&videoonly";
|
||||
else embed_videoonly = "";
|
||||
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly));
|
||||
});
|
||||
|
||||
$(document).on("click", "#playbutton_remote", function(e) {
|
||||
|
||||
Reference in New Issue
Block a user