Skip to content

Instantly share code, notes, and snippets.

View webhook-simplify.js
var PORT = process.env.PORT || 8000;
const express = require('express');
const axios = require('axios');
PRODUCT_OPTIONS_ENUM = { COLOR_TITLE: { EN: 'Color' }; // this is more complex object at live
app.post('/product-update', function (req, res, next) {
const filterByName = (name) => {
return (item) => {
View related-by-current-product.liquid
View re-init.js
// Re-init sidebar function
var rtlsidebar = (function () {
let sidebarjs;
function init() {
var sidebarElement = $('#sidebarjs');
var sidebarPosition = isRTL() ? "right" : "left";
View filters-sidebar.js
var tagFiltering = (function () {
let selectors = {
tag: ".tag",
tagActiveClass: "tag--active",
applyFilterBtn: ".apply-filters"
};
let locationOrigin = window.location.origin;
let collectionUrl = locationOrigin + "{{ collection.url }}";
let resultTagsArray = [];
View parallax_scrolling.js
var Parallax = (function() {
let SCROLL_STOP = 130;
let selectors = {
main: '.js-parallax',
title: '.js-parallax__title',
content: '.js-parallax__content'
}
function createMap(in_min, in_max, out_min, out_max) {