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
$(window).load(function() { | |
var isAd = false; | |
$pdk.controller.addEventListener("OnMediaStart", function(event) { | |
if(event.data.baseClip.isAd === true) { | |
isAd=true; | |
} else { | |
isAd = false; | |
window['optimizely'] = window['optimizely'] || []; | |
window.optimizely.push(["trackEvent", "video_start"]); | |
} |
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
@mixin semi-transparent-background($color, $opacity) { | |
$red: red($color); | |
$green: green($color); | |
$blue: blue($color); | |
$hex_color: rgb($red,$green,$blue); | |
$hex_color_with_alpha: rgba($color,$opacity); | |
$ie_hex_color: ie-hex-str($hex_color_with_alpha); | |
background: $hex_color; | |
background: $hex_color_with_alpha; | |
-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_hex_color}, endColorstr=#{$ie_hex_color}); |
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
window.addEventListener("beforeunload", function() { var currentdate = new Date(); console.log("refreshing at " + currentdate);}, false); |
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
$(document).ready(function(){ | |
(function($){ | |
var timeoutID; | |
var scrolledToTarget = false; | |
var $target = $(".your-object"); | |
var target_bottom = $target.offset().top - $target.outerHeight(); | |
function stopCheck() { | |
timeoutID = null; |
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
<?php | |
// run this gist to compile your SASS files in a shared hosting environment (I'm on Dreamhost) | |
// you must have SASS installed and running fine from the command line already http://sass-lang.com/ | |
// this file will echo your success/failure, and if there's an error create a file detailing what it is | |
$descriptorspec = array( | |
0 => array("pipe", "r"), // stdin is a pipe that the child will read from | |
1 => array("pipe", "w"), // stdout is a pipe that the child will write to | |
2 => array("file", "./error-output.txt", "a") // stderr is a file to write to | |
); |
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
$(document).ready(function(){ | |
(function($, document){ | |
$(document).scroll(function() { | |
window['optimizely'] = window['optimizely'] || []; | |
window.optimizely.push(["trackEvent", "scroll_start"]); | |
$(this).off("scroll"); | |
}); | |
})(window.$, document); |
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
$(document).ready(function(){ | |
(function($){ | |
var timeoutID; | |
var scrolledTo25Pct = false; | |
function stopCheck() { | |
timeoutID = null; | |
} |