Amazon - Hide delivered items from open orders

Hides all delivered items from your open orders.

  1. // ==UserScript==
  2. // @name Amazon - Hide delivered items from open orders
  3. // @description Hides all delivered items from your open orders.
  4. // @author Daku (admin@codeanimu.net)
  5. // @namespace https://github.com/DakuTree/userscripts
  6. // @homepage https://github.com/DakuTree/userscripts
  7. // @homepageURL https://github.com/DakuTree/userscripts
  8. // @supportURL https://github.com/DakuTree/userscripts/issues
  9. // @icon https://www.amazon.co.uk/favicon.ico
  10. // @match https://www.amazon.co.uk/gp/*/order-history/*orderFilter=open*
  11. // @match https://www.amazon.co.jp/gp/*/order-history/*orderFilter=open*
  12. // @match https://www.amazon.com/gp/*/order-history/*orderFilter=open*
  13. // @match https://www.amazon.es/gp/*/order-history/*orderFilter=open*
  14. // @match https://www.amazon.de/gp/*/order-history/*orderFilter=open*
  15. // @match https://www.amazon.it/gp/*/order-history/*orderFilter=open*
  16. // @match https://www.amazon.fr/gp/*/order-history/*orderFilter=open*
  17. // @match https://www.amazon.ca/gp/*/order-history/*orderFilter=open*
  18. // @match https://www.amazon.cn/gp/*/order-history/*orderFilter=open*
  19. // @version 1.0.2
  20.  
  21. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
  22. // ==/UserScript==
  23.  
  24.  
  25. // (?:co(?:m|\.(?:uk|jp))|es|de|it|fr|ca|cn)
  26. 'use strict';
  27.  
  28. //Hide delivered items.
  29. $(/* Delivered items */'.shipment-is-delivered').add(
  30. $(/* Dispatched items */'.a-color-success:contains(Dispatched)').parents('.shipment')
  31. ).add(
  32. $(/* Irregular delivered items, but not marked as such */'.shipment:not(:has(.shipment-top-row))')
  33. ).hide();
  34.  
  35. //Generate link to show hidden items.
  36. $('#controlsContainer').after(
  37. $('<div/>', {style: 'text-align: center'}).append(
  38. $('<a/>', {id: 'show-hidden', href: '#', text: 'Click to show delivered items'})
  39. )
  40. );
  41. $('body').on('click', 'a#show-hidden', function() {
  42. $('.shipment-is-delivered').add($('.a-color-success:contains(Dispatched)').parents('.shipment')).show();
  43. $(this).hide();
  44. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址