This file contains hidden or 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 fFlick = function(){ | |
Array.from(document.querySelectorAll( ".flickity-slider [aria-hidden='true']" )).forEach( ( e )=>{ | |
e.setAttribute("aria-hidden", "false") | |
e.removeAttribute("aria-hidden") | |
e.dataset.flickPoly = "1" | |
}) | |
}; | |
["DOMContentLoaded", "resize", "click"].forEach( ( evn )=>{ | |
document.addEventListener( evn, ( ev )=>{ fFlick() }) | |
}) |
This file contains hidden or 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
isJSON( sIn ){ | |
let isVal = false | |
try { isVal = typeof (JSON.parse( sIn )) } catch ( er ) { } | |
return ( isVal == "object" ) | |
} |
This file contains hidden or 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
shallowDelta(newObj, oldObj){ | |
if (Object.keys(oldObj).length == 0 | |
&& Object.keys(newObj).length > 0) | |
return newObj; | |
let diff = {}; | |
for (const key in oldObj) { | |
if (newObj[key] && oldObj[key] != newObj[key] ) { | |
diff[key] = newObj[key]; | |
} | |
} |
This file contains hidden or 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 prettyTimeExt = ( sDt ) => { | |
return new Date( sDt ).toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute:"2-digit", second:"2-digit" } ); | |
} |
This file contains hidden or 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 genLorumIpsum = ( Sentences=1 )=>{ // Generate Lorem Ipsum | Orig Latin De finibus | |
if( Sentences == -1 ) Sentences = Math.floor(Math.random() * 5) + 1 // If -1 gen rnd num sentences 1-5 | |
const aLI = "lorem ipsum a ab accusamus accusantium ad adipiscing alias aliquam aliquid amet animi aperiam architecto asperiores aspernatur assumenda at atque aut autem beatae blanditiis commodi consectetur consequatur consequuntur corporis corrupti culpa cum cumque cupiditate debitis delectus deleniti deserunt dicta dignissimos distinctio do dolor dolore dolorem doloremque dolores doloribus dolorum dquis ducimus ea eaque earum eius eligendi enim eos error ert esse est et eum eveniet ex excepturi exercitationem expedita explicabo facere facilis fuga fugiat fugit harum hic id illo illum impedit in incididunt inventore ipsa ipsam irure iste itaque iusto labore laboriosam laborum laudantium libero magnam magni maiores maxime minima minus modi molestiae molestias mollitia nam natus necessitatibus nemo neque nesciunt |
This file contains hidden or 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 oResp = fetch("/uri/", { | |
"body": "IPOID=" + formData.IPOID + "&ProjectID=" + formData.ProjectID, | |
"headers": { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, | |
"method": "POST", "mode": "cors", "credentials": "include" | |
}) | |
.then( ( resp )=>{ | |
if( !resp.ok ) throw new Error( resp.status ) | |
return resp.arrayBuffer(); | |
} ) | |
.then( ( buffer )=>{ |
This file contains hidden or 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
class FlickPatch { // Flick Carousel ARIA-HIDDEN observer | |
constructor(_d, _sQ) { | |
this._d = _d; this._sQ = _sQ; | |
this.aF = []; this.aObs = []; | |
} | |
init() { // | |
this.aF = Array.from( this._d.querySelectorAll( this._sQ )) | |
if( this.aF.length ){ | |
this.aObs = [] | |
this.aF.forEach( ( eF )=>{ |
This file contains hidden or 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 from 'node-fetch'; | |
// import util from "util"; | |
import jProds from "./json/chps_shpy_prods_images.json" assert { type: "json" }; | |
let oHeaders = {'Content-Type': 'application/json', 'X-shopify-Access-Token': 'qqq'} | |
const SBASE = "https://qqq.myshopify.com/admin/api/2023-04/" | |
const SNOIMAGECOL = "449524269336" | |
let aTick = []; |
This file contains hidden or 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
let oZipup = (function( _d, _q ){ // Author: Scott C. Krause | |
let elZInp = _d.querySelector("#service_location") | |
let elZbtn = _d.querySelector("#get_services") | |
let sZip = "" | |
let jExcp = [ ["60010", "IL-Others", "/business/"], ["60119", "IL-Others", "/business/"] ] | |
return { | |
"init": function(){ | |
if( elZInp && elZbtn ){ | |
setInterval( oZipup.tick, 800 ) | |
elZbtn.addEventListener( "click", oZipup.click ) |
This file contains hidden or 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 fs = require("fs") | |
const jSmall = require("./json/rics_updated_product_list_small.json"); // | |
const jClasses = require("./json/rics_export_classes.json"); // | |
const jSkus = require("./json/rics_export_skus.json"); // | |
let aOut = [] | |
let sOut = "" | |
jSmall.forEach(function( sProd ){ | |
let aItems = sProd.split(",") |
NewerOlder