brickplanetspyro / Brick Planet instant-purchase buttons

// ==UserScript==
// @name         Brick Planet instant-purchase buttons
// @namespace    https://brickplanet.com/
// @version      0.1
// @description  Removes the confirmation popup in purchase buttons
// @author       Spyro
// @require      https://code.jquery.com/jquery-latest.min.js
// @match        https://*/store/*
// @license      MIT
// ==/UserScript==

const buttons = {
    ".buy-button-bits.buyForBits": 0,
    ".buy-button-bits.buyForCredits": 1
}

for (let buy in buttons) {
    if ($(buy).length) {
        $(buy).on('click', () => {
            buyItem(buttons[buy])
        })
    }
}