Created
May 16, 2019 07:52
-
-
Save squill/3d29a0c13a6eac3a8d150387497b521f to your computer and use it in GitHub Desktop.
Uncaught SyntaxError: Unexpected token =>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/wp-content/plugins/atomic-blocks/dist/assets/js/dismiss.js?ver=1556813107:6 | |
When that is put into a browser, it gives this: | |
(function($) { | |
$(document).ready(function() { | |
const elems = document.querySelectorAll('.ab-block-notice.ab-dismissable[data-id]'); | |
elems.forEach(el => { | |
const uid = el.getAttribute( 'data-id' ); | |
if ( ! localStorage.getItem(`notice-${uid}`) ) { | |
el.style.display = 'block'; | |
} | |
if ( $( '.ab-notice-dismiss' ).length ) { | |
el.querySelector('.ab-notice-dismiss').addEventListener('click', () => { | |
localStorage.setItem(`notice-${uid}`, 1); | |
el.style.display = ''; | |
}) | |
} | |
}) | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment