PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.1.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.1.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / gutenberg / src / components / responsive-icons / index.js

index.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.1.0, at modules/gutenberg/src/components/responsive-icons/index.js

32 lines 930 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 document.addEventListener( 'load', spectra_responsive_icons );
2 document.addEventListener( 'DOMContentLoaded', spectra_responsive_icons );
3
4 import DeviceIcons from './device-icons';
5
6 function spectra_responsive_icons() {
7 wp.data.subscribe( function () {
8 setTimeout( function () {
9 spectra_responsive_icon();
10 }, 500 );
11 } );
12 }
13
14 function spectra_responsive_icon() {
15 if ( !document.querySelector( '.edit-post-header__settings' ) ) {
16 return null;
17 }
18 if ( document.querySelector( '.spectra-responsive-icons__wrap' ) ) {
19 return null;
20 }
21
22 const buttonWrapper = document.createElement( 'div' );
23 buttonWrapper.classList.add( 'spectra-responsive-icons__wrap' );
24
25 document.querySelector( '.edit-post-header__settings' ).insertBefore( buttonWrapper,document.querySelector( '.edit-post-header__settings' ).firstChild );
26 wp.element.render(
27 <DeviceIcons />,
28 document.querySelector( '.spectra-responsive-icons__wrap' )
29 );
30 }
31
32