amazon subscribe and save button!!

adds a subscribe and save button to the left of the returns & orders button in the same style as the rest of amazon

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

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

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!)

Advertisement:

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

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

Advertisement:

// ==UserScript==
// @name         amazon subscribe and save button!!
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  adds a subscribe and save button to the left of the returns & orders button in the same style as the rest of amazon
// @author       Nicole_
// @match        https://www.amazon.com/*
// @icon         https://icons.duckduckgo.com/ip2/amazon.com.ico
// @license MIT
// @run-at       document-start
// ==/UserScript==
setTimeout(addbutton, 10)
setTimeout(addbutton, 20)
setTimeout(addbutton, 30)
setTimeout(addbutton, 40)
setTimeout(addbutton, 50)
setTimeout(addbutton, 100)
setTimeout(addbutton, 200)
document.addEventListener("DOMContentLoaded", function () {
    addbutton()
});
function addbutton(){
    let toprightbuttons = document.querySelector('.layoutToolbarPadding');
    if (toprightbuttons.innerHTML.includes("?ref_=nav_orders_first")){
        toprightbuttons.innerHTML = toprightbuttons.innerHTML.replace("/customer-preferences/edit?ie=UTF8&amp;preferencesReturnUrl=%2F&amp;ref_=topnav_lang", "/customer-preferences/edit").replace("https://www.amazon.com/gp/css/homepage.html?ref_=nav_youraccount_btn", "https://www.amazon.com/gp/css/homepage.html").replace('<a href="/gp/css/order-history?ref_=nav_orders_first" class="nav-a nav-a-2   nav-progressive-attribute" id="nav-orders" tabindex="0">\n  <span class="nav-line-1">Returns</span>\n  <span class="nav-line-2">&amp; Orders<span class="nav-icon nav-arrow"></span></span>\n</a>', '<a href="/gp/css/order-history" class="nav-a nav-a-2   nav-progressive-attribute" id="nav-orders" tabindex="0">\n  <span class="nav-line-1">Returns</span>\n  <span class="nav-line-2">&amp; Orders<span class="nav-icon nav-arrow"></span></span>\n</a><a href="/auto-deliveries/subscriptionList" class="nav-a nav-a-2   nav-progressive-attribute" id="nav-orders" tabindex="0">\n  <span class="nav-line-1">Subscribe</span>\n  <span class="nav-line-2">&amp; Save<span class="nav-icon nav-arrow"></span></span>\n</a>').replace('/gp/cart/view.html?ref_=nav_cart', '/gp/cart/view.html')
    }
};