Skip to content

Instantly share code, notes, and snippets.

View paulgosnell's full-sized avatar

Paul paulgosnell

View GitHub Profile
@ngryman
ngryman / snippet.js
Last active February 14, 2019 23:55 — forked from necolas/snippet.js
/*
* 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;
@fender841
fender841 / gist:5255958
Last active December 15, 2015 11:49
Changing add_to_cart button text on single product pages and category view pages.
//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
@paulgosnell
paulgosnell / Full Sample for v 0.3
Created December 7, 2011 20:34 — forked from rpupkin77/Full Sample for v 0.3
place engine - jquery plugin for gmaps place search
<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>
@mislav
mislav / releasenotes.md
Created November 3, 2011 19:10
Zepto.js v0.8 release notes

Changes in Zepto since v0.7

Most notable additions in [Zepto][gh] 0.8 are:

  1. CSS transitions for every browser with animate() method;
  2. Unified event handling with fn.on() & off();
  3. Ajax global events, timeout support, and other improvements;
  4. Performance boost for selectors;
  5. 2 new add-ons.
@scottjehl
scottjehl / hideaddrbar.js
Created August 31, 2011 11:42
Normalized hide address bar for iOS & Android
/*
* 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 ){
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#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";
}
}
@chuanxshi
chuanxshi / mobile tags for your '<head>'
Created March 1, 2011 14:56
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->