Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Remove nag when clicking on links without snapshot param
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Aug 8, 2016
1 parent b3707da commit e08b899
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions js/customize-snapshots-frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ var CustomizeSnapshotsFrontend = ( function( $ ) {
}
$( document.documentElement ).on( 'click focus mouseover', 'a, area', function( event ) {
component.injectLinkQueryParam( this );

if ( 'click' === event.type && ! component.doesLinkHaveSnapshotQueryParam( this ) && ! $( this ).parent().hasClass( 'ab-customize-snapshots-item' ) ) {
if ( confirm( component.data.l10n.leaveSessionPrompt ) ) {
if ( component.hasSessionStorage ) {
sessionStorage.removeItem( 'customize_snapshot_uuid' );
}
} else {
event.preventDefault();
}
}
} );
};

Expand Down
2 changes: 1 addition & 1 deletion php/class-customize-snapshot-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ public function add_snapshot_exit_link( $wp_admin_bar ) {
}
$wp_admin_bar->add_menu( array(
'id' => 'exit-customize-snapshot',
'title' => __( 'Exit Snapshot', 'customize-snapshots' ),
'title' => __( 'Exit Snapshot Preview', 'customize-snapshots' ),
'href' => remove_query_arg( 'customize_snapshot_uuid' ),
'meta' => array(
'class' => 'ab-item ab-customize-snapshots-item',
Expand Down

0 comments on commit e08b899

Please sign in to comment.