Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~/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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement