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 | |
preg_replace('/(\?|\&)?utm_[a-z]+=[^\&]+/', '', 'http://mashable.com/2010/12/14/android-quick-start-guide/?utm_source=twitterfeed&utm_medium=twitter&utm_campaign=Feed%3A+Mashable+%28Mashable%29'); | |
// Returns http://mashable.com/2010/12/14/android-quick-start-guide/ | |
# 100 urls to test against | |
# ======================== | |
# | |
# http://activeinboxhq.com/?utm_medium=Argyle+Social&utm_source=TweetDeck&utm_content=http=//activeinboxhq.com/ |
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
$(document).ready(function(){ | |
// Local Scroll | |
function filterPath(string) { | |
return string.replace(/^\//,'').replace(/(index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,''); | |
} | |
$('a[href*=#]').each(function() { | |
if ( | |
filterPath(location.pathname) == filterPath(this.pathname) | |
&& location.hostname == this.hostname | |
&& this.hash.replace(/#/,'') |
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
// Extend jQuery to add a function for implementing "Nice Inputs" | |
jQuery.fn.makeNiceInput = function(){ | |
// Setup the selected elements as nice inputs. | |
jQuery(this).each(function(){ | |
if(jQuery('label[for='+jQuery(this).attr('id')+']').length > 0){ | |
var MNval = jQuery('label[for='+jQuery(this).attr('id')+']').hide().text(); |
NewerOlder