速卖通上货beta

上货。

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)


    // ==UserScript==
    // @name         速卖通上货beta
    // @namespace    http://tampermonkey.net/
    // @version      0.253
    // @description  上货。
    // @author       wwp
    // @match        *://gsp.aliexpress.com/apps/product/publish*
    // @require         http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js
    // @grant        none
    // ==/UserScript==
     

//main
(function() {
    console.log("页面加载完成");
    console.log( $("#struct-nav > div > ul"));
    var Span_ClearGoods = '<li role="menuitem" title=" 扩展:清空商品" aria-selected="false" tabindex="-1" class="next-menu-item next-nav-item"><div class="next-menu-item-inner"><span class="next-menu-item-text"><span style="color:red;" onclick="ClearGoods()">清空商品</span></span></div></li>';
    $("#struct-nav > div > ul")[0].innerHTML = $("#struct-nav > div > ul").innerHTML + Span_ClearGoods;
})();

window.onload=function(){
    console.log("页面加载完成");
    console.log( $("#struct-nav > div > ul"));
    var Span_ClearGoods = '<li role="menuitem" title=" 扩展:清空商品" aria-selected="false" tabindex="-1" class="next-menu-item next-nav-item"><div class="next-menu-item-inner"><span class="next-menu-item-text"><span style="color:red;" onclick="ClearGoods()">清空商品</span></span></div></li>';
    $("#struct-nav > div > ul")[0].innerHTML = $("#struct-nav > div > ul").innerHTML + Span_ClearGoods;
    }
    


//清空商品
function ClearGoods() {
    var _length = $("#struct-saleProp > div:nth-child(1) > div.next-col.next-col-20.sell-o-addon-content > div > div.info-content > div > div > div").children.length;
    for (var i = 1; i < _length; i++) {
        console.log(i);
        $("#struct-saleProp > div:nth-child(1) > div.next-col.next-col-20.sell-o-addon-content > div > div.info-content > div > div > div > div:nth-child(" + i + ") > div > span.color-upload-wrap > button").click();
    }
}