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
[YOUR_WEBSITE]/account/login?checkout_url=/checkouts/ |
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 XX contains 'http://' or XX contains 'https://' %}It's an external link{% endif %} |
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
function is_touch_device() { | |
return 'ontouchstart' in window // works on most browsers | |
|| 'onmsgesturechange' in window; // works on ie10 | |
}; |
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
/* Vh Calc */ | |
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit | |
let vh = window.innerHeight * 0.01; | |
// Then we set the value in the --vh custom property to the root of the document | |
document.documentElement.style.setProperty('--vh', `${vh}px`); | |
window.setTimeout(() => { | |
let vh = window.innerHeight * 0.01; | |
document.documentElement.style.setProperty('--vh', `${vh}px`); | |
}, 1000); |
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
// Source: https://css-tricks.com/snippets/sass/px-to-em-functions/ | |
@function rem($pixels, $context: 16) { | |
@return (math.div($pixels, $context)) * 1rem; | |
} |
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
// check device | |
let isMobile = false; | |
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | |
isMobile = true; | |
document.body.classList.add('is-mobile'); | |
} |
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
<HTML> | |
<HEAD> | |
<!-- anti-flicker snippet (recommended) --> | |
<style>.async-hide { opacity: 0 !important} </style> | |
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; | |
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; | |
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; | |
})(window,document.documentElement,'async-hide','dataLayer',4000, | |
{'CONTAINER_ID':true});</script> |
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
function checkBrowserVersion() { | |
var objappVersion = navigator.appVersion; | |
var objAgent = navigator.userAgent; | |
var objbrowserName = navigator.appName; | |
var objfullVersion = ''+parseFloat(navigator.appVersion); | |
var objBrMajorVersion = parseInt(navigator.appVersion,10); | |
var objOffsetName,objOffsetVersion,ix; | |
// In Chrome | |
if ((objOffsetVersion=objAgent.indexOf("Chrome"))!=-1) { |
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
function confetti(){ | |
'use strict'; | |
var onlyOnKonami = false; | |
$(function() { | |
// Globals | |
var $window = $(window) | |
, random = Math.random |
NewerOlder