#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
doctype html | |
/[if lt IE 7] | |
| <html class="ie6"> | |
/[if IE 7] | |
| <html class="ie7"> | |
/[if IE 8] | |
| <html class="ie8"> | |
/[if IE 9] | |
| <html class="ie9"> | |
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]--> |
This gist is no longer valid. Please see Compass-Rails for instructions on how to install.
$(document).ready(function() { | |
$.waypoints.settings.scrollThrottle = 30; | |
$('#main').waypoint(function(event, direction){ | |
/* Just as we have a sticky class applied when we hit the top waypoint, | |
we'll have a different class applied when we bottom out */ | |
if (direction === 'down') { | |
$(this).removeClass('sticky').addClass('bottomed'); | |
} | |
else { | |
$(this).removeClass('bottomed').addClass('sticky'); |
# Note that while this file is in our config folder, it is | |
# symlinked to our site folders, so paths are relative from there | |
# Require gems and Compass plugins | |
# require 'rgbapng' | |
# require 'compass-fancybox-plugin' | |
require 'compass-growl' | |
# General | |
output_style = :expanded |
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
/(youtu(?:\.be|be\.com)\/(?:.*v(?:\/|=)|(?:.*\/)?)([\w'-]+))/i | |
Tested examples: | |
http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo | |
http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel | |
http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub | |
http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I | |
http://www.youtube.com/user/SilkRoadTheatre#p/a/u/2/6dwqZw0j_jY | |
http://youtu.be/6dwqZw0j_jY | |
http://www.youtube.com/watch?v=6dwqZw0j_jY&feature=youtu.be |
// * iOS zooms on form element focus. This script prevents that behavior. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1"> | |
// If you dynamically add a maximum-scale where no default exists, | |
// the value persists on the page even after removed from viewport.content. | |
// So if no maximum-scale is set, adds maximum-scale=10 on blur. | |
// If maximum-scale is set, reuses that original value. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0"> | |
// second maximum-scale declaration will take precedence. | |
// * Will respect original maximum-scale, if set. | |
// * Works with int or float scale values. |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
$sprites: sprite-map("sprites/*.png") | |
$sprites-retina: sprite-map("sprites-retina/*.png") | |
=sprite-background($name) | |
background-image: sprite-url($sprites) | |
background-position: sprite-position($sprites, $name) | |
background-repeat: no-repeat | |
display: block | |
height: image-height(sprite-file($sprites, $name)) | |
width: image-width(sprite-file($sprites, $name)) |