06.03.2025, 15:05
You need to replace only the doShowPlan function not the whole JS code. Complete JS should look like this:
Code:
var origDoShowPlan = window.doShowPlan
if (origDoShowPlan) {
var scrolIds = [2, 3, 4]
$(function() {
scrolIds.forEach(function(id) {
$('#plan-' + id).addClass('layer-centered-h')
})
})
doShowPlan = function(plan) {
visAutoWidth = scrolIds.indexOf(currentPlanId) >= 0
$('.layers').css('overflow-y', visAutoWidth ? 'auto' : 'hidden');
origDoShowPlan(plan)
}
}