mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Add help on videos manager
This commit is contained in:
parent
86bc51d6da
commit
e08269c9c2
3 changed files with 213 additions and 127 deletions
|
@ -2998,7 +2998,7 @@ $(document).ready(function () {
|
|||
var innerDiv = $(this).find("div.hidden");
|
||||
avideoAlertInfo(innerDiv.html());
|
||||
});
|
||||
|
||||
|
||||
setInterval(function () {
|
||||
TotalPageLoadSeconds++;
|
||||
}, 1000);
|
||||
|
@ -4358,9 +4358,16 @@ function startTour(stepsFileRelativePath) {
|
|||
success: function (response) {
|
||||
// Initialize the tour with the fetched data
|
||||
var tour = introJs();
|
||||
tour.setOptions({
|
||||
steps: response
|
||||
var filteredSteps = $.grep(response, function (step) {
|
||||
var $element = $(step.element);
|
||||
// Only include steps where the element exists and is fully visible (not in a hidden parent)
|
||||
return $element.length > 0 && isElementVisible($element);
|
||||
});
|
||||
|
||||
tour.setOptions({
|
||||
steps: filteredSteps
|
||||
});
|
||||
|
||||
tour.start();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
@ -4368,6 +4375,10 @@ function startTour(stepsFileRelativePath) {
|
|||
}
|
||||
});
|
||||
}
|
||||
function isElementVisible($element) {
|
||||
// Check if the element itself and its parent chain are visible
|
||||
return $element.is(':visible') && $element.closest(':hidden').length === 0;
|
||||
}
|
||||
}
|
||||
|
||||
function findIndex(value, array) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue