mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
update
This commit is contained in:
parent
60f5cf73b0
commit
9453952faa
2 changed files with 28 additions and 5 deletions
|
@ -905,6 +905,8 @@ img.blur {
|
||||||
|
|
||||||
#CloseButtonInVideo {
|
#CloseButtonInVideo {
|
||||||
display: none;
|
display: none;
|
||||||
|
justify-content: center; /* Horizontally centers the content (i.e., the <i> element) */
|
||||||
|
align-items: center;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
@ -912,6 +914,8 @@ img.blur {
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
color: #333;
|
color: #333;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
}
|
}
|
||||||
#CloseButtonInVideo:hover {
|
#CloseButtonInVideo:hover {
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
@ -920,7 +924,7 @@ img.blur {
|
||||||
.vjs-user-active #CloseButtonInVideo,
|
.vjs-user-active #CloseButtonInVideo,
|
||||||
.vjs-paused #CloseButtonInVideo,
|
.vjs-paused #CloseButtonInVideo,
|
||||||
body>#CloseButtonInVideo {
|
body>#CloseButtonInVideo {
|
||||||
display: inline-block;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rightProfile li a {
|
.rightProfile li a {
|
||||||
|
|
|
@ -1269,6 +1269,16 @@ function avideoAlertAJAX(url) {
|
||||||
|
|
||||||
function avideoAlertHTMLText(title, msg, type) {
|
function avideoAlertHTMLText(title, msg, type) {
|
||||||
var isErrorOrWarning = (type == 'error' || type == 'warning');
|
var isErrorOrWarning = (type == 'error' || type == 'warning');
|
||||||
|
var className = "btn btn-primary btn-block";
|
||||||
|
if(type == 'error'){
|
||||||
|
var className = "btn btn-danger btn-block";
|
||||||
|
}else if(type == 'warning'){
|
||||||
|
var className = "btn btn-warning btn-block";
|
||||||
|
}else if(type == 'info'){
|
||||||
|
var className = "btn btn-info btn-block";
|
||||||
|
}else if(type == 'success'){
|
||||||
|
var className = "btn btn-success btn-block";
|
||||||
|
}
|
||||||
var span = document.createElement("span");
|
var span = document.createElement("span");
|
||||||
span.innerHTML = msg;
|
span.innerHTML = msg;
|
||||||
swal({
|
swal({
|
||||||
|
@ -1279,14 +1289,15 @@ function avideoAlertHTMLText(title, msg, type) {
|
||||||
closeOnClickOutside: !isErrorOrWarning,
|
closeOnClickOutside: !isErrorOrWarning,
|
||||||
buttons: {
|
buttons: {
|
||||||
confirm: {
|
confirm: {
|
||||||
text: "OK", // or whatever text you want
|
text: "OK",
|
||||||
value: true,
|
value: true,
|
||||||
visible: isErrorOrWarning ? false : (empty(type) ? false : true),
|
visible: isErrorOrWarning,
|
||||||
className: "btn btn-success" // Add your class name here
|
className: className
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(".swal-button--confirm").removeClass("swal-button");
|
$(".swal-button--confirm").removeClass("swal-button");
|
||||||
|
$(".swal-button-container").removeClass("swal-button-container");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3906,6 +3917,8 @@ function closeFullscreenVideo() {
|
||||||
if (originalURL) {
|
if (originalURL) {
|
||||||
history.pushState({}, null, originalURL);
|
history.pushState({}, null, originalURL);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
swal.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3938,7 +3951,13 @@ function addCloseButton(elementToAppend) {
|
||||||
closeButton.html('<i class="fas fa-times"></i>');
|
closeButton.html('<i class="fas fa-times"></i>');
|
||||||
// Add event listener
|
// Add event listener
|
||||||
closeButton.on('click', function() {
|
closeButton.on('click', function() {
|
||||||
window.parent.closeFullscreenVideo();
|
if (window.self !== window.top) {
|
||||||
|
console.log('close parent iframe');
|
||||||
|
window.parent.closeFullscreenVideo();
|
||||||
|
}else{
|
||||||
|
console.log('close history.back');
|
||||||
|
window.history.back();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// Append the close button to the Video.js player
|
// Append the close button to the Video.js player
|
||||||
elementToAppend.append(closeButton);
|
elementToAppend.append(closeButton);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue