#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.
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
#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.
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* MIT License | |
*/ | |
(function( win ){ | |
var doc = win.document; | |
// If there's a hash, or addEventListener is undefined, stop here | |
if( !location.hash && win.addEventListener ){ |
<html> | |
<head> | |
<title>Place Engine Test</title> | |
</head> | |
<body> | |
<a href="#" id="clear">Clear markers</a><br /> | |
<div id="map" style="width:100%;height:600px;"> | |
</div> |
//For changing add-to-cart button text on single product pages. | |
add_filter('single_add_to_cart_text', 'single_cart_button_text', ); | |
function single_cart_button_text() { | |
return __('Add to order', 'woocommerce'); | |
} | |
//For changing add-to-cart button text on category view pages |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(d, u) { | |
var s = d.scripts[0], | |
i = u.length, g; |