NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Hide "NEW TO ALIEXPRESS?" popup in AliExpress // @description This will hide the "NEW TO ALIEXPRESS?" popup in AliExpress and enable back the scrollbar. // @include https://www.aliexpress.com/* // @icon https://ae01.alicdn.com/images/eng/wholesale/icon/aliexpress.ico // @grant none // @license MIT // @author Ninel // @version 1.0 // ==/UserScript== //Function used to create a new CSS style object inside the website function AddGlobalStyle (cssStr) { var D = document; var newNode = D.createElement ('style'); newNode.textContent = cssStr; var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement; targ.appendChild (newNode); } //Add the following styles to block the site from showing those CSS classes or to manipulating the scrollbar. I hope this catches them all or don't block too much :D AddGlobalStyle (` BODY { overflow: visible !important; } .newuser-container, .ui-window.ui-window-normal.ui-window-transition.ui-newuser-layer-dialog, .next-dialog.next-closeable.ui-newuser-layer-dialog, .next-overlay-backdrop, .ui-mask { display: none !important; } `); //There was another class ".next-overlay-inner.next-dialog-container" which had to be hidden, but it was used in shipping method dialog :(( //This is not a fancy method, but works. It will hide and delete the popup code once it is generated. var Loop_Check_Popup = setInterval( function(){ var _obj = document.querySelector(".next-overlay-wrapper.opened"); if((typeof _obj != "undefined") && (_obj.innerHTML.match(/NEW TO ALIEXPRESS|newuser-container/))) { _obj.style.display = "none"; _obj.parentNode.removeChild(_obj); // document.querySelector(".next-dialog-close").click(); clearInterval(Loop_Check_Popup); } }, 150);