From 856fc5975b796229929a0fe4eb3692bbc71fa1b2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 5 Aug 2015 18:23:54 +0200 Subject: [PATCH] Fix broken switchToPad method --- src/static/js/pad.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 6ee39b6b7..eb90a8831 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -465,8 +465,8 @@ var pad = { }, switchToPad: function(padId) { - var newHref = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname) || clientVars.padId; - newHref = newHref[0]; + var options = document.location.href.split('?')[1]; + var newHref = padId; if (typeof options != "undefined" && options != null){ newHref = newHref + '?' + options; }