PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/agent.js +6 -3 3.0.4 → trunk View file →
@@ -1,6 +1,7 @@
1 1 import { Agent } from '@agent/Agent.jsx';
2 2 import { render } from '@shared/lib/dom';
3 +import { isEmbedded } from '@shared/lib/embedded-guard';
3 4 import { isOnLaunch } from '@shared/lib/utils';
4 5 import domReady from '@wordpress/dom-ready';
5 6 import '@agent/agent.css';
6 7 import '@agent/buttons';
@@ -6,11 +7,13 @@
6 7 import '@agent/buttons';
7 8 import { GuidedTour } from '@agent/components/GuidedTour';
8 9 import { throwSideConfetti } from './lib/confetti';
9 10
10 -const isInsideIframe = () => !!document.querySelector('body.iframe');
11 +domReady(() => {
12 + // Never activate framed — the Customizer preview, page-builder previews,
13 + // and the block-editor canvas are all someone else's iframe.
14 + if (isEmbedded()) return;
11 15
12 -domReady(() => {
13 16 // disableForReducedMotion
14 17 // tours
15 18 const tourId = 'extendify-agent-tour';
16 19 if (document.getElementById(tourId)) return;
@@ -24,9 +27,9 @@
24 27 // admin area
25 28 document.getElementById('wpwrap') ||
26 29 // TODO: is this on all block themes?
27 30 document.querySelector('.wp-site-blocks');
28 - if (isOnLaunch() || isInsideIframe() || !bg) return;
31 + if (isOnLaunch() || !bg) return;
29 32 const id = 'extendify-agent-main';
30 33 if (document.getElementById(id)) return;
31 34 const agent = Object.assign(document.createElement('div'), {
32 35 className: 'extendify-agent',