🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Amazon - Hide delivered items from open orders

Hides all delivered items from your open orders.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Amazon - Hide delivered items from open orders
// @description  Hides all delivered items from your open orders.
// @author       Daku ([email protected])
// @namespace    https://github.com/DakuTree/userscripts
// @homepage     https://github.com/DakuTree/userscripts
// @homepageURL  https://github.com/DakuTree/userscripts
// @supportURL   https://github.com/DakuTree/userscripts/issues
// @icon         https://www.amazon.co.uk/favicon.ico
// @match        https://www.amazon.co.uk/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.co.jp/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.com/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.es/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.de/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.it/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.fr/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.ca/gp/*/order-history/*orderFilter=open*
// @match        https://www.amazon.cn/gp/*/order-history/*orderFilter=open*
// @version      1.0.2

// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
// ==/UserScript==


// (?:co(?:m|\.(?:uk|jp))|es|de|it|fr|ca|cn)
'use strict';

//Hide delivered items.
$(/* Delivered items */'.shipment-is-delivered').add(
	$(/* Dispatched items */'.a-color-success:contains(Dispatched)').parents('.shipment')
).add(
	$(/* Irregular delivered items, but not marked as such */'.shipment:not(:has(.shipment-top-row))')
).hide();

//Generate link to show hidden items.
$('#controlsContainer').after(
	$('<div/>', {style: 'text-align: center'}).append(
		$('<a/>', {id: 'show-hidden', href: '#', text: 'Click to show delivered items'})
	)
);
$('body').on('click', 'a#show-hidden', function() {
	$('.shipment-is-delivered').add($('.a-color-success:contains(Dispatched)').parents('.shipment')).show();
	$(this).hide();
});