diff --git a/lib/slidenotes/client.js b/lib/slidenotes/client.js
index f594fb62..1aba8b8c 100644
--- a/lib/slidenotes/client.js
+++ b/lib/slidenotes/client.js
@@ -1,7 +1,6 @@
 (function() {
 	// don't emit events from inside the previews themselves
-	var qs = window.location.href.split('?');
-	if (qs.length > 1 && qs[1].match('receiver')) { return; }
+	if ( window.location.search.match( /receiver/gi ) ) { return; }
 
 	var socket = io.connect(window.location.origin);
 	var socketId = Math.random().toString().slice(2);