Add listing

Add a add listing button to your traderie page!

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Add listing
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add a add listing button to your traderie page! 
// @author       MythicalHysteria
// @match        https://traderie.com/*/product/*
// @icon         https://www.google.com/s2/favicons?domain=traderie.com
// @grant        none
// ==/UserScript==

(function() {
    function add() {
    document.querySelector("#root > div.sc-eXlDFz.fmdpDr > div:nth-child(1) > div.product > div.container > div.product-action-bar > div:nth-child(1) > button").click();
}

function tickBox() {
    document.querySelector("#root > div.sc-eXlDFz.fmdpDr > div:nth-child(1) > div.product > div.container > div.create-listing > div:nth-child(5) > div.create-listing-checks > label:nth-child(2) > input[type=checkbox]").click();
}

function send() {
    document.querySelector("#root > div.sc-eXlDFz.fmdpDr > div:nth-child(1) > div.product > div.container > div.create-listing > div.create-listing-btn-bar > button").click();
    console.log("Complete");
}

function ok() {
    document.querySelector("#root > div.sc-eXlDFz.fmdpDr > div:nth-child(1) > div.product > div.container > div.create-listing-confirm > button").click()
}

var btn = document.createElement("BUTTON");
btn.innerHTML = "Add to listing";
document.body.appendChild(btn);
document.querySelector("body > button").style.position = "fixed";
btn.addEventListener('click', () => {
    add();
    setTimeout(tickBox, 1000);
    setTimeout(send, 1500);
    setTimeout(ok, 2000);
});



})();