Listia Mass Price Updater

When the price of XNK per dollar goes up or down significantly, we probably all need to mass update prices // on our Listia listings. This TamperMonkey script will, upon a Listia listing being opened for editing, will change the // GetItNow price by multiplying by the predetermined "multiply" variable and click on the update button. If you need to // // turn off price updating, go to Tampermonkey's Dashboard and disable the script or disable Tampermonkey itself.

目前為 2018-11-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Listia Mass Price Updater
// @namespace    http://tampermonkey.net/
// @version      0.12.1.2
// @description  When the price of XNK per dollar goes up or down significantly, we probably all need to mass update prices // on our Listia listings. This TamperMonkey script will, upon a Listia listing being opened for editing, will change the // GetItNow price by multiplying by the predetermined "multiply" variable and click on the update button. If you need to // // turn off price updating, go to Tampermonkey's Dashboard and disable the script or disable Tampermonkey itself.
// @author       Gostud on fiverr.com
// @match        https://www.listia.com/auction/edit/*
// @grant        none
// ==/UserScript==


(function() {
    'use strict';

    window.list_log = function() {
        var log = JSON.parse(localStorage.log || "[]");
        console.log(log);
    }

    window.onload = function() {
        var multiply = 0.965;
        var title = document.querySelector("#auction_form_auction_params_title").value
        var log = JSON.parse(localStorage.log || "[]")

        if(typeof sessionStorage[title] == "undefined") {
            var val = document.querySelector("#auction_form_auction_params_buy_bid-fixed_price");
            var logRow = title + " price updated from " + val.value + " to " + val.value * multiply
            log.push(logRow)
            localStorage.log = JSON.stringify(log)

            val.value = Math.round(val.value * multiply);
            sessionStorage[title] = true;

            setTimeout(function() {
                console.log("sending form!")
                document.querySelector(".submit_l[type=submit]").click()
            }, 3000)
        } else {
            console.log("Product updated recently!");
        }
    }

})();

QingJ © 2025

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