Greasy Fork is available in English.
2024/8/14 16:59:49
当前为
// ==UserScript==
// @name 店小秘[速卖通]列表显示全部🛠
// @namespace Violentmonkey Scripts
// @license MIT
// @match https://www.dianxiaomi.com/smtProduct/*
// @grant GM_xmlhttpRequest
// @require https://update.greasyfork.icu/scripts/499487/1427818/%E5%BA%97%E5%B0%8F%E7%A7%98%E9%80%9A%E7%94%A8%E5%87%BD%E6%95%B0.js
// @grant none
// @version 0.1
// @author -
// @description 2024/8/14 16:59:49
// ==/UserScript==
var bnt = $(`<li class='showall'><a href="javascript:;">All</a></li>`);
$("#loading").on("hidden.bs.modal",function(){
var hasList = !!$("#pageList");
bnt.on("click",async function(){
console.log("test");
$('#loading').modal('show');
var url = 'https://www.dianxiaomi.com/smtProduct/pageList.htm'
var data = smtPageListSearchData();
data.pageSize = '300';
let book = await tool.getTotalPage(url,data,op='POST');
pages = book[0];
for (var i = 1;i<book.length;i++){
pages.find("#goodsContent tbody#smtSysMsg").append(book[i].find("#goodsContent tr.content"));
}
var html = pages.map(function(){return this.outerHTML}).toArray().join("");
$('#pageList').html(html)
$('#loading').modal('hide');
});
if(hasList && !$("li.showall").length){
$("#upPage:has(*),#downPage:has(*)").append(bnt);
}
})