Re: iFrame integration doesn't work with phpbb Lightbox Extension
Posted: Wed Jun 26, 2024 9:08 am
I can replace this whole part
now by
Code: Select all
// Lightbox scroll fix
$(".postimage").on("click", function(e){
var topg = $($(this.getBoundingClientRect().top));
var t = parseInt(topg[Object.keys(topg)[0]]);
$("#lightbox").animate({top: t+'px'}, 100);
});
// #phpbb_alert scroll fix
$("#add_files").on("click", function(e) {
var topg = $($(this.getBoundingClientRect().top));
var t = parseInt(topg[Object.keys(topg)[0]]);
$("#phpbb_alert").animate({top: t+'px'}, 100);
});
$("#quickmod,.bookmark-link").on("click", function(event) {
var pos = window.scrollY + document.querySelector('#quickmod').getBoundingClientRect().top;
$(parent.window).scrollTop( 200 );
$("#darkenwrapper").on("click", function() {
$(parent.window).scrollTop( pos );
});
$("#darken").on("click", function() {
$(parent.window).scrollTop( pos );
});
});
Code: Select all
// Lightbox scroll fix, #phpbb_confirm scroll fix, #phpbb_alert scroll fix
$(".postimage,.dropdown-contents li a,#add_files").on("click", function(e) {
var g = $($(this.getBoundingClientRect().top));
var t = parseInt(g[Object.keys(g)[0]]);
$("#phpbb_alert,#phpbb_confirm,#lightbox").animate({top: t+'px'}, 100);
});