Greasy Fork is available in English.
ヤフオクの検索結果が入札件数順で表示されている時に、その内容を更に終了時刻順番で並び替える
当前为
// ==UserScript==
// @name ヤフオクの入札件数順表示を更に終了時刻順番で並び替え
// @namespace https://hisaruki.ml/
// @version 1
// @description ヤフオクの検索結果が入札件数順で表示されている時に、その内容を更に終了時刻順番で並び替える
// @author hisaruki
// @match https://auctions.yahoo.co.jp/*
// @icon https://www.google.com/s2/favicons?domain=yahoo.co.jp
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
let u = new URLSearchParams(document.URL);
if(u.get("s1") == "bids" && u.get("o1") == "a"){
let root = $("ul.Products__items");
let products = [];
root.find("li.Product").each(function(){
products.push($(this).clone());
$(this).remove();
});
products.filter(x => {
return (x.find(".Product__bid").text() - 0) > 0;
})
.sort((a, b) => {
a = a.find("[data-auction-endtime]").attr("data-auction-endtime") - 0;
b = b.find("[data-auction-endtime]").attr("data-auction-endtime") - 0;
return a - b;
}).map(x => {
root.append(x);
return true;
});
products.filter(x => {
return (x.find(".Product__bid").text() - 0) == 0;
}).map(x => {
root.append(x);
return true;
});
}
// Your code here...
})();