Skip to content

Instantly share code, notes, and snippets.

View blanklob's full-sized avatar
👨‍🚀
Building on Shopify!

Youness Id bakkasse blanklob

👨‍🚀
Building on Shopify!
View GitHub Profile
@davidwarrington
davidwarrington / submit-form.js
Last active August 21, 2023 01:46
Submit a form with JS
/** @param {HTMLFormElement} form */
async function submitForm(form) {
const body = new FormData(body)
return fetch(form.action, {
method: form.method,
body,
})
}
export interface IEndpoints {
/**
* Returns Ajax Cart
*/
get: '/cart.json',
/**
* Add a product to cart
*/
add: '/cart/add.js',
/**
@blanklob
blanklob / blank-cli-utils.sh
Last active July 15, 2022 12:16
Blank Command Line Utils
# Click the copy button in the right-hand corner.
blank()
{
__V="2.20.0"
__H="
Blanklob utils to work seamlessly with Shopify CLI $__V
USAGE
blank <command> [options]