mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed scrollbar disapearing on modal, and added width+height adjustment for embed, along with fixing error in position of controls of embed
This commit is contained in:
@@ -152,7 +152,11 @@
|
|||||||
<p>Copy the code in the textarea, and paste on your website.</p>
|
<p>Copy the code in the textarea, and paste on your website.</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" id="autoplay" checked="checked" />
|
<input type="checkbox" id="autoplay" checked="checked" />
|
||||||
<label for="autoplay">Autoplay</label>
|
<label for="autoplay" class="padding_right_26">Autoplay</label>
|
||||||
|
<label for="width_embed" class="embed-label">Width</label>
|
||||||
|
<input type="number" value="600" id="width_embed" class="settings_embed" min="1" />
|
||||||
|
<label for="height_embed" class="padding_left_6 embed-label">Height</label>
|
||||||
|
<input type="number" value="300" id="height_embed" class="settings_embed" min="1" />
|
||||||
</p>
|
</p>
|
||||||
<textarea id="embed-area"></textarea>
|
<textarea id="embed-area"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
background-color:grey;
|
background-color:grey;
|
||||||
width:50vw;
|
width:50vw;
|
||||||
color:white;
|
color:white;
|
||||||
margin-top:0px;
|
margin-top:-6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#playpause, #duration, #volume-button
|
#playpause, #duration, #volume-button
|
||||||
|
|||||||
@@ -10,6 +10,29 @@
|
|||||||
|
|
||||||
.snow{-webkit-filter:brightness(100%);-moz-filter:brightness(100%);-o-filter:brightness(100%);filter:brightness(100%);width:5px; height:5px; background-color:white;z-index:1000000;pointer-events:none;position:absolute;border:1px solid white;border-radius:100px;}
|
.snow{-webkit-filter:brightness(100%);-moz-filter:brightness(100%);-o-filter:brightness(100%);filter:brightness(100%);width:5px; height:5px; background-color:white;z-index:1000000;pointer-events:none;position:absolute;border:1px solid white;border-radius:100px;}
|
||||||
|
|
||||||
|
.settings_embed{
|
||||||
|
width:40px !important;
|
||||||
|
padding:0 10px !important;
|
||||||
|
border:none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings_embed:focus{
|
||||||
|
border:none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding_right_26 {
|
||||||
|
padding-right: 26px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding_left_6{
|
||||||
|
padding-left: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.embed-label{
|
||||||
|
font-size:1rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
#embed-button{
|
#embed-button{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
@@ -209,6 +232,7 @@ body {
|
|||||||
-ms-transition:background-color 1s;
|
-ms-transition:background-color 1s;
|
||||||
-o-transition:background-color 1s;
|
-o-transition:background-color 1s;
|
||||||
transition:background-color 1s;
|
transition:background-color 1s;
|
||||||
|
overflow-y:scroll !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main, #main-row, .video-container, #playlist{
|
.main, #main-row, .video-container, #playlist{
|
||||||
|
|||||||
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
6
static/dist/main.min.js
vendored
6
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -31,6 +31,9 @@ var blinking = false;
|
|||||||
var access_token_data = {};
|
var access_token_data = {};
|
||||||
var spotify_authenticated = false;
|
var spotify_authenticated = false;
|
||||||
var not_import_html = "";
|
var not_import_html = "";
|
||||||
|
var embed_height = 300;
|
||||||
|
var embed_width = 600;
|
||||||
|
var embed_autoplay = "&autoplay";
|
||||||
|
|
||||||
if(localStorage.debug === undefined){
|
if(localStorage.debug === undefined){
|
||||||
var debug = false;
|
var debug = false;
|
||||||
@@ -204,7 +207,7 @@ function init(){
|
|||||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||||
$("#search").focus();
|
$("#search").focus();
|
||||||
$("#embed-button").css("display", "inline-block");
|
$("#embed-button").css("display", "inline-block");
|
||||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height));
|
||||||
$("#search").attr("placeholder", "Find song on YouTube...");
|
$("#search").attr("placeholder", "Find song on YouTube...");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -282,6 +285,10 @@ function disable_debug(){
|
|||||||
localStorage.debug = false;
|
localStorage.debug = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function embed_code(autoplay, width, height){
|
||||||
|
return '<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + autoplay + '" width="' + width + 'px" height="' + height + 'px">';
|
||||||
|
}
|
||||||
|
|
||||||
function spotify_is_authenticated(bool){
|
function spotify_is_authenticated(bool){
|
||||||
if(bool){
|
if(bool){
|
||||||
if(localStorage.debug === "true"){
|
if(localStorage.debug === "true"){
|
||||||
@@ -371,6 +378,18 @@ $(document).on('click', "#aprilfools", function(){
|
|||||||
$(".mega").css("-moz-transform", "rotate(0deg)");
|
$(".mega").css("-moz-transform", "rotate(0deg)");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(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));
|
||||||
|
});
|
||||||
|
|
||||||
|
$(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));
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on('click', ".chan-link", function(e){
|
$(document).on('click', ".chan-link", function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Nochan.to_channel($(this).attr("href"), false);
|
Nochan.to_channel($(this).attr("href"), false);
|
||||||
@@ -452,11 +471,9 @@ $(window).focus(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("change", "#autoplay", function() {
|
$(document).on("change", "#autoplay", function() {
|
||||||
if(this.checked) {
|
if(this.checked) embed_autoplay = "&autoplay";
|
||||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
else embed_autoplay = "";
|
||||||
} else {
|
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height));
|
||||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '" width="600px" height="300px">');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", "#playbutton_remote", function(e) {
|
$(document).on("click", "#playbutton_remote", function(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user