This file contains hidden or 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
// {Boolean} c Condition | |
// {String} f File name | |
var loadjs = function(c,f) { | |
var l = f.length; | |
if ( c && f.substring(l - 3, l) === ".js") { | |
var j = document.createElement('script'); | |
j.type = 'text/javascript'; | |
j.src = f; | |
j.async = false; | |
if (typeof j != "undefined") { |
This file contains hidden or 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
<link rel="apple-touch-icon" href="touch-icon-iphone.png" /> | |
<link rel="apple-touch-icon" sizes="72x72" href="touch-icon-ipad.png" /> | |
<link rel="apple-touch-icon" sizes="114x114" href="touch-icon-iphone4.png" /> | |
<!--src:http://bit.ly/gWFA6M--> |
This file contains hidden or 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
javascript:(function(){(function(){var el=document.createElement('div'),b=document.getElementsByTagName('body')[0];otherlib=false,msg='';el.style.position='fixed';el.style.height='32px';el.style.width='220px';el.style.marginLeft='-110px';el.style.top='0';el.style.left='50%';el.style.padding='5px 10px 5px 10px';el.style.zIndex=1001;el.style.fontSize='12px';el.style.color='#222';el.style.backgroundColor='#f99';function getLint(url){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;}};head.appendChild(script);}function getScript(url,success){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done= |
This file contains hidden or 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
function test_jQuery() { jQuery(""); } | |
function success_jQuery() { alert("jQuery is loaded!"); | |
var successfully_loaded = false; | |
function loadOrFallback(scripts,idx) { | |
function testAndFallback() { | |
clearTimeout(fallback_timeout); | |
if (successfully_loaded) return; // already loaded successfully, so just bail | |
try { | |
scripts[idx].test(); |
This file contains hidden or 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 a = 1, | |
b = function a(x) { | |
x && a(--x); | |
}; | |
alert(a); | |
--------------------------------------- |
This file contains hidden or 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
.js {} | |
.no-js {} | |
.flexbox {} | |
.no-flexbox {} | |
.canvas {} | |
.no-canvas {} | |
.canvastext {} | |
.no-canvastext {} | |
.webgl {} | |
.no-webgl {} |
This file contains hidden or 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>Title</title> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" media="screen"> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-git.js"></script> | |
<script type="text/javascript"> | |
// Docs: http://docs.jquery.com/Qunit | |
</script> | |
</head> |
This file contains hidden or 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
/*! LAB.js (LABjs :: Loading And Blocking JavaScript) | |
v1.2.0 (c) Kyle Simpson | |
MIT License | |
*/ | |
(function(p){var q="string",w="head",L="body",M="script",u="readyState",j="preloaddone",x="loadtrigger",N="srcuri",E="preload",Z="complete",y="done",z="which",O="preserve",F="onreadystatechange",ba="onload",P="hasOwnProperty",bb="script/cache",Q="[object ",bw=Q+"Function]",bx=Q+"Array]",e=null,h=true,i=false,k=p.document,bc=p.location,bd=p.ActiveXObject,A=p.setTimeout,be=p.clearTimeout,R=function(a){return k.getElementsByTagName(a)},S=Object.prototype.toString,G=function(){},r={},T={},bf=/^[^?#]*\//.exec(bc.href)[0],bg=/^\w+\:\/\/\/?[^\/]+/.exec(bf)[0],by=R(M),bh=p.opera&&S.call(p.opera)==Q+"Opera]",bi=("MozAppearance"in k.documentElement.style),bj=(k.createElement(M).async===true),v={cache:!(bi||bh),order:bi||bh||bj,xhr:h,dupe:h,base:"",which:w};v[O]=i;v[E]=h;r[w]=k.head||R(w);r[L]=R(L);function B(a){return S.call(a)===bw}function U(a,b){var c=/^\w+\:\/\//,d;if(typeof a!=q)a="";if(typeof b!=q)b="";d=((/^\/\// |
This file contains hidden or 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 monthAbbreviation = function(month_index){ | |
m_names = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | |
s = m_names[month_index - 1]; | |
return s.substr(0,3).toUpperCase()); | |
}; |
This file contains hidden or 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
function bitlyfi(url, func) { | |
var defaults = { | |
token: '', | |
longUrl: url | |
}; | |
// Build the URL to query | |
var bitly = 'https://api-ssl.bitly.com/v3/shorten?' + '&access_token=' + defaults.token + '&longUrl=' + defaults.longUrl + '&format=json&callback=?'; | |
// Utilize the bit.ly API | |
$.getJSON(bitly, function (results) { |