Amazon - Hide delivered items from open orders

Hides all delivered items from your open orders.

目前为 2016-01-31 提交的版本。查看 最新版本

// ==UserScript==
// @name         Amazon - Hide delivered items from open orders
// @namespace    https://github.com/DakuTree/userscripts
// @author       Daku ([email protected])
// @description  Hides all delivered items from your open orders.
// @homepageURL  https://github.com/DakuTree/userscripts
// @supportURL   https://github.com/DakuTree/userscripts/issues
// @include      /^https?:\/\/www\.amazon\.(?:co(?:m|\.(?:uk|jp))|es|de|it|fr|ca|cn)\/gp\/(?:your-account|css)?\/?order-history.*orderFilter\=open.*$/
// @updated      2016-01-31
// @version      1.0.0
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
// ==/UserScript==
/* jshint -W097 */
/* global $:false, jQuery:false */
'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();
});

QingJ © 2025

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