From a6969770bd669fef99d6a0a2f99643d622c036ca Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 4 Jul 2012 14:42:27 -0400 Subject: [PATCH] simplify query match --- lib/slidenotes/client.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/slidenotes/client.js b/lib/slidenotes/client.js index f594fb6..1aba8b8 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);