mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 11:22:41 +01:00
Fallback for browsers that don't support window.history.pushstate
This commit is contained in:
parent
4ccd7131d3
commit
070ba40f4f
1 changed files with 15 additions and 8 deletions
|
@ -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];
|
||||||
if(options != null)
|
var newHref = "/p/" + padId;
|
||||||
window.history.pushState("", "", "/p/" + padId + '?' + options);
|
if (options != null)
|
||||||
else
|
newHref = newHref + '?' + options;
|
||||||
window.history.pushState("", "", "/p/" + padId);
|
|
||||||
|
|
||||||
sendClearSessionInfo();
|
if(window.history && window.history.pushState)
|
||||||
receivedClientVars = false;
|
{
|
||||||
sendClientReady(false);
|
window.history.pushState("", "", newHref);
|
||||||
|
sendClearSessionInfo();
|
||||||
|
receivedClientVars = false;
|
||||||
|
sendClientReady(false);
|
||||||
|
}
|
||||||
|
else // fallback
|
||||||
|
{
|
||||||
|
window.location.href = newHref;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
sendClientMessage: function(msg)
|
sendClientMessage: function(msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue