Skip to content

Instantly share code, notes, and snippets.

@ezemery
Last active March 25, 2021 20:31
Show Gist options
  • Save ezemery/62a639206b503365b04ba23521b7a921 to your computer and use it in GitHub Desktop.
Save ezemery/62a639206b503365b04ba23521b7a921 to your computer and use it in GitHub Desktop.
This is a initialisation script for a javascript widget I built. The widget is embedded on popular e-commerce website such as https://www.princesspolly.com.au/pages/shop-tiktok. The widget enables merchants to import tiktok and instagram videos on their website making products shoppable.
<div id="vop-root"></div>
<script type="text/javascript">
(function (w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'vop', ' https://cdn.getvop.com/embed/scripts/embed.js'));
vop('init', { element: document.getElementById('vop-root'), appId: 558, component: 'carousel', template: 2, socials: { tiktok: 'https://www.tiktok.com/@princesspolly' } });
</script>
@ezemery
Copy link
Author

ezemery commented Mar 25, 2021

HOW TO USE THIS SCRIPT

  1. Create a standard html file
  2. Copy script into the body of the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment