PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.6.0
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.6.0
1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / integrations / elementor-editor-scroll.js
hostinger-reach / frontend / integrations Last commit date
elementor-editor-scroll.js 2 months ago optinmonster.js 5 months ago
elementor-editor-scroll.js
51 lines
1 (function () {
2 function getTargetElementId() {
3 var match = (window.location.hash || '').match(/elementor-element-([\w-]+)/);
4 return match ? match[1] : null;
5 }
6
7 function findInPreviewIframe(elementId) {
8 const iframe = document.querySelector('#elementor-preview-iframe');
9 if (!iframe || !iframe.contentWindow) return null;
10
11 return iframe.contentWindow.document.getElementById(elementId);
12 }
13
14 function scrollToElement(elementId) {
15 if (!elementId) return false;
16
17 const target = findInPreviewIframe(elementId);
18 if (!target) {
19 return false;
20 }
21
22 if ( ! target ) return false;
23
24 target.scrollIntoView({ behavior: 'smooth', block: 'center' });
25 return true;
26 }
27
28 function initScroll() {
29 const elementId = getTargetElementId();
30 if (!elementId) return;
31
32 let attempts = 0;
33
34 const interval = setInterval(() => {
35 if (scrollToElement(elementId) || attempts > 30) {
36 clearInterval(interval);
37 }
38 attempts++;
39 }, 500);
40 }
41
42 if (window.elementor) {
43 window.elementor.on('preview:loaded', function () {
44 console.log('Elementor preview loaded');
45 initScroll();
46 });
47 } else {
48 window.addEventListener('load', initScroll);
49 }
50 })();
51