| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/hello-plus/tests/playwright/helpers/ |
Upload File : |
export function setupNoticeRemoval() {
return () => {
const removeNotices = () => {
const elements = document.querySelectorAll( '#e-notice-bar' );
elements.forEach( ( el ) => {
console.log( '๐๏ธ CTA Test: Removing notice element: #e-notice-bar' );
el.remove();
} );
if ( elements.length > 0 ) {
console.log( `๐งน CTA Test: Removed ${ elements.length } notice elements` );
}
};
removeNotices();
if ( 'loading' === document.readyState ) {
document.addEventListener( 'DOMContentLoaded', removeNotices );
}
const observer = new MutationObserver( ( mutations ) => {
let needsRemoving = false;
mutations.forEach( ( mutation ) => {
mutation.addedNodes.forEach( ( node ) => {
if ( 1 === node.nodeType ) {
const element = node as HTMLElement;
if ( 'e-notice-bar' === element.id ) {
needsRemoving = true;
}
}
} );
} );
if ( needsRemoving ) {
setTimeout( removeNotices, 100 );
}
} );
if ( 'loading' === document.readyState ) {
document.addEventListener( 'DOMContentLoaded', () => {
observer.observe( document.body, { childList: true, subtree: true } );
} );
} else {
observer.observe( document.body, { childList: true, subtree: true } );
}
console.log( '๐ CTA Test: Notice removal system initialized for Elementor Pro' );
};
}