- Go to your Shopify
admin/settings/filespage - Open your browser Dev tools, go to the console
Then, depending on the option you choose:
- Make sure your browser is set to download files automatically and doesn't ask for the download location every time
| // Try.ts | |
| // By Colin Teahan | |
| // August 14th, 2024 | |
| // | |
| // This TypeScript file enables usage of the .try() method which will return a result tuple of [T?, Error?] | |
| // from any function or async function. This works by defining a new property on the global Object.prototype | |
| // and then do some type-fu. | |
| // | |
| // Example usage: | |
| // https://www.typescriptlang.org/play/?target=99#code/MYewdgziA2CmB0w4EMBOAKAlAKGwejwAJCAVVAT3gBcJ8jCAhcwgYRgEsxTZkALZMHWIBBAK4BzURCqEAjABYqvADSEATAAY18ukNK92EUuQAOsAMrBU7EzIBm7OIVhhkAIzhGpycbEIg7QiU-agosQgBbWCUQABNCAHcDYF5Ex2hCVGjRVC5kTNgIUWgZKlETJwDCAG0SAH5VAFFUVBBUOoBdPTtWiMIBZjtRMGAqdnB-VH6IchHCIZGx8Hh9Q0S2gGsjN2ZY2AcwTnF+wjBYBMITVrNUKmYJ4MJxaBA3ZAyAeTcAK1hR+CuICoQNMsD0AniwS4sRAhCgUSCoIAtEN4LoCMRGgAPZARCp+by+ABc6PoC1G4y4vioAFUILBUEwAJKxdDsWJE06iCJuBmYQgAbz0xGI7ECbPiAB4ALyEDT8pStC5nC7NVoYADknAAbu92YQpAzCOyNTgMSLiFkyrlBadcbBORqGK8Nap9QBfPSegh6UCQGTVQ2oVQM9UdQiy6l0hnM2KhcjoeWESVIpHOFptNLQDK8grWs6xX3gaQ1IMhjOocOR6LRxnkFnx9CyfkptNBwhOl3GoxWnIF0nEAByHxIjU5JAMRjW0nSJwSm2NXEB4iyECMEO7pyBcNE |
| // Code "forked" from https://stackoverflow.com/a/66430461/4788966 | |
| import Document, { | |
| Main, | |
| NextScript, | |
| Head, | |
| Html | |
| } from 'next/document' | |
| import {readFileSync} from "fs" | |
| import {join} from "path" |
| /* https://go.tacodewolff.nl/minify */ | |
| enScroll=!1,enFdl=!1,extCurrent=void 0,filename=void 0,targetText=void 0,splitOrigin=void 0;const lStor=localStorage,sStor=sessionStorage,doc=document,docEl=document.documentElement,docBody=document.body,docLoc=document.location,w=window,s=screen,nav=navigator||{},extensions=["pdf","xls","xlsx","doc","docx","txt","rtf","csv","exe","key","pps","ppt","pptx","7z","pkg","rar","gz","zip","avi","mov","mp4","mpe","mpeg","wmv","mid","midi","mp3","wav","wma"];function a(e,t,n,o){const j="G-XXXXXXXXXX",r=()=>Math.floor(Math.random()*1e9)+1,c=()=>Math.floor(Date.now()/1e3),F=()=>(sStor._p||(sStor._p=r()),sStor._p),E=()=>r()+"."+c(),_=()=>(lStor.cid_v4||(lStor.cid_v4=E()),lStor.cid_v4),m=lStor.getItem("cid_v4"),v=()=>m?void 0:enScroll==!0?void 0:"1",p=()=>(sStor.sid||(sStor.sid=c()),sStor.sid),O=()=>{if(!sStor._ss)return sStor._ss="1",sStor._ss;if(sStor.getItem("_ss")=="1")return void 0},a="1",g=()=>{if(sStor.sct)if(enScroll==!0)return sStor.sct;else x=+sStor.getItem("sct")+ +a,sSto |
| /* Using a JavaScript proxy for a super low code REST client */ | |
| // via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
| // also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
| // also see https://github.com/fastify/manifetch | |
| // also see https://github.com/flash-oss/allserver | |
| // and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const createApi = (url) => { | |
| return new Proxy({}, { | |
| get(target, key) { |
| function fetchPageAssets() { | |
| let images = document.querySelectorAll('img[src*=files]'); | |
| images.forEach(function(image) { | |
| files.push('<a href="' + image.src.replace(/_60x60/, "") + '"><img src="' + image.src.replace(/_60x60/, "") + '">'); | |
| }); | |
| } | |
| function downloadListFile() { | |
| let button = document.createElement("a"); | |
| let data = 'data:application/octet-stream;base64,' + window.btoa(files.join('\n')); |
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { |
| const AWS = require("aws-sdk"); | |
| const {link} = require("linkfs"); | |
| const mock = require('mock-require'); | |
| const fs = require('fs'); | |
| const tmpDir = require('os').tmpdir(); | |
| exports.handler = (event, context) => { | |
| rewriteFs(); | |
| invokeGatsby(context); | |
| } |
admin/settings/files pageThen, depending on the option you choose:
News RSS Feeds
| News | |
| Bloomberg | |
| Bloomberg Markets | http://www.bloomberg.com/feeds/podcasts/advantage.xml |
| Bloomberg Views | http://www.bloomberg.com/feeds/podcasts/view.xml |
| Bloomberg Radio | https://www.bloomberg.com/feeds/podcasts/featured.xml |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent