File tree 2 files changed +6
-17
lines changed
2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 5
5
* @param $
6
6
*/
7
7
( function ( $ ) {
8
- var refreshEvent = $ . Event ( 'boldgrid_customizer_refresh' ) ,
9
- $body = $ ( 'body' ) ,
10
- $themeControls = $ ( '#customize-theme-controls' ) ;
11
- $window = $ ( window ) ;
8
+ var refreshEvent = $ . Event ( 'boldgrid_customizer_refresh' ) ,
9
+ $body = $ ( 'body' ) ,
10
+ $themeControls = $ ( '#customize-theme-controls' ) ,
11
+ $window = $ ( window ) ;
12
12
13
13
$window . on ( 'message' , function ( e ) {
14
- var message ,
15
- event = e . originalEvent ;
16
-
17
- // Ensure we have a string that's JSON.parse-able.
18
- if ( 'string' !== typeof event . data || '{' !== event . data [ 0 ] ) {
19
- return ;
20
- }
21
-
22
- message = JSON . parse ( event . data ) ;
23
- if ( 'synced' === message . id ) {
24
- $window . trigger ( refreshEvent , message ) ;
25
- }
14
+ $window . trigger ( refreshEvent , e . originalEvent . data ) ;
26
15
} ) ;
27
16
28
17
// Prevent interaction with panels until Customizer fully loads.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ BOLDGRID.CUSTOMIZER = BOLDGRID.CUSTOMIZER || {};
12
12
self . hover_bound = false ;
13
13
self . section_click_bound = false ;
14
14
$ ( function ( ) {
15
- $window . on ( 'boldgrid_customizer_refresh' , onload ) ;
15
+ $ ( window ) . on ( 'boldgrid_customizer_refresh' , onload ) ;
16
16
} ) ;
17
17
18
18
onload = function ( ) {
You can’t perform that action at this time.
0 commit comments