Skip to content

Instantly share code, notes, and snippets.

@pafnuty
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pafnuty/d5b1ab937bedca360112 to your computer and use it in GitHub Desktop.
Save pafnuty/d5b1ab937bedca360112 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function($) {
$.urlParam = function(name){
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
}
$('[name="subj"]').val(decodeURI($.urlParam('subj')))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment