Compare commits
No commits in common. "ea0321d7f827415943b57ced814a06e4aca52ea6" and "145b4b7e03a1749bf59e79c74331f72a19971ce7" have entirely different histories.
ea0321d7f8
...
145b4b7e03
@ -5,17 +5,6 @@ const CallbackModal = {
|
||||
floatingBtnId: 'floatingButton',
|
||||
|
||||
init() {
|
||||
const body = document.body;
|
||||
const showButton = body.dataset.showFloatingButton !== 'false' && body.dataset.showFloatingButton !== '0';
|
||||
const delay = parseInt(body.dataset.floatingDelay, 10) || 5000;
|
||||
|
||||
if (!showButton) {
|
||||
// Кнопка отключена – скрываем навсегда
|
||||
const btn = document.getElementById(this.floatingBtnId);
|
||||
if (btn) btn.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
const btn = document.getElementById(this.floatingBtnId);
|
||||
if (btn) {
|
||||
@ -24,7 +13,7 @@ const CallbackModal = {
|
||||
const button = btn.querySelector('.btn');
|
||||
if (button) button.classList.add('pulse');
|
||||
}
|
||||
}, delay);
|
||||
}, 5000);
|
||||
},
|
||||
|
||||
open(productTitle) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user