Skip to content

Instantly share code, notes, and snippets.

@MaxPower15
MaxPower15 / gist:5957653
Created July 9, 2013 14:12
Easily report email conversions for all Wistia embeds on a page.
<!--
For full control, the embed shepherd can be dynamically loaded from another script, and the inline script executed
after it's loaded.
-->
<script src="http://fast.wistia.com/static/embed_shepherd-v1.js"></script>
<script>
wistiaEmbeds.onFind(function(video) {
video.bind("conversion", function(type, email) {
if (/(pre|mid|post)-roll/.test(type)) {
// Using jsonp is a simple way to allow cross-domain data sharing
<span style="font-size:15px;">My smaller text</span>
@MaxPower15
MaxPower15 / gist:6043b930ab22fdd2fe15
Created January 11, 2016 14:52
Public gist test
this is a test
@MaxPower15
MaxPower15 / clap-your-hands.js
Created January 11, 2016 14:57
My Public Test
(function() {
if (this.isWorking()) {
clapYourHands(); // bottles and cans
}
}())
@MaxPower15
MaxPower15 / pause-on-not-visible.js
Last active February 1, 2021 21:06
Pause all Wistia videos when tab isn't visible, resume when visible again
var pausedDueToVisibility = [];
function pauseAllActiveWistiaVideos() {
window._wq = window._wq || [];
window._wq.push({
id: "_all",
function (video) {
if (video.state() === "playing") {
pausedDueToVisibility.push(video);
video.pause();