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
/** | |
* Creates and enum from the object based on key values | |
* | |
* @param {object} Object | |
* @return {object} enum from object | |
*/ | |
function buildEnumFromObject_(obj){ | |
var createdEnum = {}; | |
var i = 0; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Simple Test Suite</title> | |
<script> | |
(function(){ | |
var queue = [] | |
var paused = false | |
var results; |
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
Array.prototype.max = function() { | |
return Math.max.apply(Math, this); | |
} | |
Array.prototype.min = function() { | |
return Math.min.apply(Math, this); | |
} |
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 type="text/javascript" src="https://s3.amazonaws.com/wildfireapp/assets/swfobject.js"></script> | |
<div id="video-container"> | |
<div id="ytapiplayer"> | |
You need Flash player 8+ and JavaScript enabled to view this video. | |
</div> | |
</div> | |
<script type="text/javascript" src="https://s3.amazonaws.com/wildfireapp/assets/swfobject.js"></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
<script type="text/javascript"> | |
window.onload = function(){ | |
var anchors = document.getElementById('main_tab_sponsor').getElementsByTagName('a'); | |
for (var i=0; i<anchors.length; i++){ | |
anchors[i].setAttribute('target', '_blank'); | |
anchors[i].setAttribute('href', "http://www.myurl.com") | |
} | |
} | |
</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
$.fn.truncateLines = function(options) { | |
options = $.extend($.fn.truncateLines.defaults, options); | |
return this.each(function(index, container) { | |
container = $(container); | |
var containerLineHeight = Math.ceil(parseFloat(container.css('line-height'))); | |
var maxHeight = options.lines * containerLineHeight; | |
var truncated = false; | |
var truncatedText = $.trim(container.text()); | |
var overflowRatio = container.height() / maxHeight; |
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 type="text/javascript"> | |
$(document).ready( function () { | |
var url = encodeURIComponent('https://www.youtube.com/watch?v=ya7OVaIu7Yg'); | |
var title = encodeURIComponent('This is my super awesome title'); | |
var full_url = 'http://www.facebook.com/sharer.php?u=' + url + '&t=' + title; | |
$('#method1').click( function (e) { | |
e.preventDefault(); | |
window.open(full_url); | |
}); |
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
<button id="tweet_button">Click to Tweet</button> | |
<script type="text/javascript"> | |
{% plugin rawtext tweet_url %} | |
{% plugin rawtext tweet_text %} | |
{% plugin rawtext tweet_hashtags %} | |
var params = {}; | |
{% if tweet_url %} |
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
<div id="start-date"> | |
{{ my_sweeps.start_date }} | |
</div> | |
<script src="https://s3.amazonaws.com/wildfireapp/assets/momentjs/moment.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
(function($) { | |
$(document).ready(function() { | |
function formatDate(date) { | |
formattedDate = date.text(); |
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
$("embed").attr("wmode", "opaque"); | |
var embedTag; | |
$("embed").each(function(i) { | |
embedTag = $(this).attr("outerHTML"); | |
if ((embedTag != null) && (embedTag.length > 0)) { | |
embedTag = embedTag.replace(/embed /gi, "embed wmode="opaque" "); | |
$(this).attr("outerHTML", embedTag); | |
} else { | |
$(this).wrap("<div></div>"); | |
} |
OlderNewer