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
(function($, undefined) | |
{ | |
if (window.patatapSequenceIntervals) | |
{ | |
// Clear | |
$.each(window.patatapSequenceIntervals, function(index, interval) | |
{ | |
clearInterval(interval); | |
}); | |
} |
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 | |
/** | |
* Referral helper for OpenTable form submissions | |
* | |
* The RestaurantReferralID must match the RestaurantID value, however the | |
* only solution for this is JavaScript. This script copies the | |
* RestaurantID into the RestaurantReferralID and passes it to the | |
* OpenTable action endpoint. | |
* |
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
// Selector expression to return only sources that can be played | |
$.expr[':']['canplaytype'] = function(a) | |
{ | |
var video = document.createElement('video'); | |
return !!video.canPlayType && video.canPlayType(a.type); | |
}; | |
// Usage | |
var playable = $('video source:canplaytype').length; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BackgroundColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw | |
LjEyNTQ5MDE5NjEgMC4xNDExNzY0NzA2IDAuMTc2NDcwNTg4MgAQAYAC0hAREhNaJGNs | |
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp |
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
// Retina media query | |
// Source: Craft CMS | |
@retina-media-query: ~'only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx)'; | |
// Clearfix | |
// Source: http://nicolasgallagher.com/micro-clearfix-hack/ | |
.clearfix() { | |
&:before, | |
&:after { | |
content: ' '; |
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
// http://meyerweb.com/eric/tools/css/reset/ | |
// v2.0 | 20110126 | |
// License: none (public domain) | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, |
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
$('a') | |
.filter('[href^="http"], [href^="//"]') | |
.not('[href*="' + window.location.host + '"]') | |
.attr('target', '_blank'); |
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
/** | |
* jQuery.rgbToHex - Converts an RGB string to a HEX string (forces length 6) | |
* @author Joshua Baker | |
* @version 1.0.0 | |
*/ | |
;(function($){ | |
$.extend({ | |
rgbToHex: function(rgbString) { | |
var parts = rgbString.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); | |
if ( ! parts) { |
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
(function() { | |
var addTest = Modernizr.addTest; | |
var timeout; | |
var waitTime = 300; | |
var elem = document.createElement('video'); | |
var elemStyle = elem.style; | |
function testAutoplay(arg) { | |
clearTimeout(timeout); | |
elem.removeEventListener('playing', testAutoplay, 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
function is_mobile() | |
{ | |
return preg_match('/(ACER\ E101|Android|BlackBerry7230|BlackBerry7730|Blazer|LG\/U8120|LG\/U8130|LG\/U8138|LG\/U8180|LG\/U880|MIDP-2\.|Maemo\ Browser|MobilePhone|NetFront|Obigo|ObigoInternetBrowser|Opera\ Mini|SAMSUNG-SGH-i900|SymbianOS|UP\.Browser|WAP|Windows\ CE\;\ IEMobile|Windows\ CE\;\ PPC|Windows\ Phone|acer_S200|iPhone|iPod|webOS)/i', $_SERVER['HTTP_USER_AGENT']); | |
} |
OlderNewer