前の記事から更新しました。
2026年より(?)HTMLコードが変更になっていますので、対応させました。
1つ目は変更無しです。
2つ目と3つ目を更新してください。
// ==UserScript==
// @name クリックポスト:一時保存(Amazon Pay)
// @namespace http://tampermonkey.net/
// @version 2023-05-01
// @description “内容品”が「/skip」ではないお届け先の“支払手続き”を自動で実行します。
// @author penlabo
// @match https://clickpost.jp/packages/list
// @grant none
// ==/UserScript==
(function() {
'use strict';
onload = function (){
var line = 1;
while (1) {
var elmTarget = document.getElementById('AmazonPayCV2Button' + line);
if (!elmTarget) return false;
var elmParent = elmTarget.parentNode;
var elmPrevious = elmParent.previousElementSibling;
var elmText = elmPrevious.innerText;
if (elmText != '/skip') {
elmTarget.click();
return false;
}
elmParent.style.backgroundColor = 'lightgrey';
line++;
}
};
})();
その後の手続きを実行するものも追記しておきます。
// ==UserScript==
// @name クリックポスト:決済(Amazon Pay)
// @namespace http://tampermonkey.net/
// @version 2026-01-06
// @description 決済を実行します。
// @author penlabo
// @match https://payments.amazon.co.jp/checkout?*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var target = document.querySelector('#continue-button > span > input');
target.click();
})();
// ==UserScript==
// @name クリックポスト:支払手続き完了(Amazon Pay)
// @namespace http://tampermonkey.net/
// @version 2026-01-06
// @description 支払手続き完了を実行します。
// @author penlabo
// @match https://clickpost.jp/amazon_pay/confirm?*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var target = document.querySelector('#payment_buttons > form input[type="submit"]');
target.click();
})();
これで全自動で処理が進みます。