Skip to content

Instantly share code, notes, and snippets.

@ademuk
Created December 14, 2012 19:30
Show Gist options
  • Save ademuk/4287954 to your computer and use it in GitHub Desktop.
Save ademuk/4287954 to your computer and use it in GitHub Desktop.
function getParameterByName(name) {
var name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"),
regexS = "[\\?&]" + name + "=([^&#]*)",
regex = new RegExp(regexS),
results = regex.exec(window.location.search);
return results ? decodeURIComponent(results[1].replace(/\+/g, " ")) : '';
}
if(getParameterByName('no_border') == 1) {
$('html').css('background-image', 'none');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment