How can I check if the query string contains a q= in it using JavaScript or jQuery?
q=
one more variant, but almost the same as Gumbos solution:
var isDebug = function(){ return window.location.href.search("[?&]debug=") != -1; };