NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Hide Amazon's Checkout flyout sidebar // @namespace http://amazon.com/ // @version 0.2 // @description Hide Amazon's weird ugly Checkout flyout sidebar. // @author nascent // @match https://*.amazon.com.br/* // @match https://*.amazon.ca/* // @match https://*.amazon.com.mx/* // @match https://*.amazon.com/* // @match https://*.amazon.cn/* // @match https://*.amazon.in/* // @match https://*.amazon.co.jp/* // @match https://*.amazon.sg/* // @match https://*.amazon.ae/* // @match https://*.amazon.sa/* // @match https://*.amazon.fr/* // @match https://*.amazon.de/* // @match https://*.amazon.it/* // @match https://*.amazon.nl/* // @match https://*.amazon.pl/* // @match https://*.amazon.es/* // @match https://*.amazon.se/* // @match https://*.amazon.com.tr/* // @match https://*.amazon.co.uk/* // @match https://*.amazon.com.au/* // @icon https://www.google.com/s2/favicons?domain=amazon.co.uk // @updateURL https://openuserjs.org/meta/nascent/Hide_Amazons_Checkout_flyout_sidebar.meta.js // @downloadURL https://openuserjs.org/install/nascent/Hide_Amazons_Checkout_flyout_sidebar.user.js // @license GPL-3.0-or-later // @grant GM_addStyle // @run-at document-start // ==/UserScript== // version 0.2 - Removes checkout bar after page load too // version 0.1 - initial release function RemoveCheckout() { var div = document.getElementById("nav-flyout-ewc"); if (div) { div.parentNode.removeChild(div); } GM_addStyle ( '.nav-ewc-persistent-hover.a-js body {padding-right: 0px !important;}' ); console.log("remove amazon checkout bar"); } (function() { 'use strict'; RemoveCheckout(); })(); window.onload = function(){ console.debug("window.onload"); // Select the node that will be observed for mutations var targetNode = document.body; // Options for the observer (which mutations to observe) var config = { attributes: true, childList: true, subtree: true }; RemoveCheckout(); // Callback function to execute when mutations are observed var callback = function(mutationsList) { for(var mutation of mutationsList) { //If window content has changed, and type is a list item node, then update if (mutation.type == 'childList') { if (mutation.addedNodes.length >= 1) { if (mutation.addedNodes[0].nodeName == 'DIV') { RemoveCheckout(); } } } } }; // Create an observer instance linked to the callback function var observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); };