Fallback for browsers that don't support window.history.pushstate
parent
4ccd7131d3
commit
070ba40f4f
|
@ -449,14 +449,21 @@ var pad = {
|
||||||
switchToPad: function(padId)
|
switchToPad: function(padId)
|
||||||
{
|
{
|
||||||
var options = document.location.href.split('?')[1];
|
var options = document.location.href.split('?')[1];
|
||||||
|
var newHref = "/p/" + padId;
|
||||||
if (options != null)
|
if (options != null)
|
||||||
window.history.pushState("", "", "/p/" + padId + '?' + options);
|
newHref = newHref + '?' + options;
|
||||||
else
|
|
||||||
window.history.pushState("", "", "/p/" + padId);
|
|
||||||
|
|
||||||
|
if(window.history && window.history.pushState)
|
||||||
|
{
|
||||||
|
window.history.pushState("", "", newHref);
|
||||||
sendClearSessionInfo();
|
sendClearSessionInfo();
|
||||||
receivedClientVars = false;
|
receivedClientVars = false;
|
||||||
sendClientReady(false);
|
sendClientReady(false);
|
||||||
|
}
|
||||||
|
else // fallback
|
||||||
|
{
|
||||||
|
window.location.href = newHref;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
sendClientMessage: function(msg)
|
sendClientMessage: function(msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue