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
YoutubeDefer.loadAPIVideo(block) { | |
if(typeof YT === 'undefined') { | |
loadYoutubeScript(); | |
checkIfYoutubeIsReady().then(function() { | |
let player = new Vimeo.Player(iframe); | |
player.play(); | |
}); | |
} | |
else { | |
let player = new Vimeo.Player(iframe); |
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
/** | |
* Script for put into console for download all images from Shopify /admin/settings/files?limit=250 | |
* This will download new file with all images inside it | |
* Then you need to open this file and go to browser's parameters -> Save page -> Select an option for download full page | |
* Then the browser will download this page and create a folder with all images inside | |
*/ | |
function fetchPageAssets() { | |
let images = document.querySelectorAll('img[src*=files]:not(img[src*=avatar])'); | |
images.forEach(function(image) { |
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
var scriptsLoadDelay = 10000; | |
var delayedScripts = [ | |
"https://w.sharethis.com/button/buttons.js", | |
]; | |
setTimeout(function() { | |
console.log("Delayed scripts loading"); | |
for(var i=0; i<delayedScripts.length; i++) { | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.async = true; |
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
let wait = 0; | |
var waitForLoad = setInterval(function() { | |
// wait for $container | |
if($container.length || wait > 1000){ | |
clearInterval(waitForLoad); | |
} | |
wait += 50; | |
}, 50); |
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
<template v-if="view === 'grid'"> | |
<template v-for="(p, key) in result.items"> | |
<!-- added for collections banner --> | |
<div :class="\'grid__item collection-banner\'" v-if="window.banner1_position == key" v-html="window.banner1_layout"></div> | |
<!-- banner 2 --> | |
<div :class="\'grid__item collection-banner\'" v-if="window.banner2_position == key" v-html="window.banner2_layout"></div> | |
<!-- /// --> | |
<usf-sr-griditem :product="p" :result="result"></usf-sr-griditem> | |
</template> | |
</template> |