This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.options = { | |
priorities = { | |
low = { | |
minimumTickLength = 1000, | |
}, | |
medium = { | |
minimumTickLength = 500, | |
}, | |
high = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const authenticationHeaders = new Headers(); | |
authenticationHeaders.append("Content-Type", "application/json"); | |
authenticationHeaders.append("X-Shopify-Storefront-Access-Token", <access-token-here>); | |
const articleGraphql = JSON.stringify({ | |
query: "query {\n blog(handle: \"testimonials\"){\n articles(first: 100){\n edges{\n node{\n id\n title\n url\n metafield(namespace: \"testimonial\", key: \"product\"){\n value }\n }\n }\n }\n }\n}", | |
variables: {} | |
}); | |
const articleRequest = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type {Validator} from "remix-validated-form"; | |
import {withZod} from "@remix-validated-form/with-zod"; | |
import {z} from "zod"; | |
import {address, UserAgent} from "~/requests/client/config"; | |
interface IRuntimeForm { | |
[key: string]: any; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import axios from 'axios'; | |
import axiosThrottle from 'axios-request-throttle'; | |
axiosThrottle.use(axios, {requestsPerSecond: 2}); | |
const domain = 'https://blah:blah@store.myshopify.com'; | |
const version = '2022-07' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"errors": [ | |
{ | |
"debugMessage": "Expected a value of type \"MenuLocationEnum\" but received: footer_1", | |
"message": "Internal server error", | |
"extensions": { | |
"category": "internal" | |
}, | |
"locations": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch, {Headers} from 'node-fetch'; | |
import fs from 'fs'; | |
const headers = new Headers({ | |
"Authorization": "{your bearer token}{" | |
}); | |
const requestOptions = { | |
method: `GET`, | |
headers: headers, | |
redirect: `follow`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', function (event) { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
const pageType = (path: string): string|false => { | |
switch(path) | |
{ | |
case 'method': | |
return 'pages'; | |
case 'book-a-consultation': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if block.type == 'reviews' %} | |
<script> | |
document.querySelector('.spr-starrating').classList.add('cursor-pointer') | |
document.querySelector(`div.spr-summary-starrating`).onclick = function (e) { | |
Array.from(document.querySelectorAll('.sf-tab-header')).find(el => el.textContent.includes("Product reviews")).click(); | |
setTimeout(function(){ | |
document.querySelector('div[data-id="{{ product.id }}"]').scrollIntoView(); | |
}, 200) | |
} | |
</script> |
NewerOlder