Merge branch 'master' of https://github.com/Pita/etherpad-lite
This commit is contained in:
commit
c8bfd21c03
|
@ -6,4 +6,6 @@ bin/abiword.exe
|
|||
bin/node.exe
|
||||
etherpad-lite-win.zip
|
||||
var/dirty.db
|
||||
bin/convertSettings.json
|
||||
bin/convertSettings.json
|
||||
*~
|
||||
*.patch
|
|
@ -76,10 +76,13 @@ function isArray(testObject)
|
|||
|
||||
if (typeof exports !== "undefined")
|
||||
{
|
||||
var navigator = {userAgent: "node-js"};
|
||||
userAgent = "node-js";
|
||||
}
|
||||
else
|
||||
{
|
||||
userAgent = navigator.userAgent.toLowerCase();
|
||||
}
|
||||
// Figure out what browser is being used (stolen from jquery 1.2.1)
|
||||
userAgent = navigator.userAgent.toLowerCase();
|
||||
var browser = {
|
||||
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
|
||||
safari: /webkit/.test(userAgent),
|
||||
|
|
|
@ -174,7 +174,7 @@ function handshake()
|
|||
function sendClientReady(isReconnect)
|
||||
{
|
||||
var padId = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1);
|
||||
padId = unescape(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
|
||||
padId = decodeURIComponent(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
|
||||
|
||||
if(!isReconnect)
|
||||
document.title = document.title + " | " + padId;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
//get the padId out of the url
|
||||
var urlParts= document.location.pathname.split("/");
|
||||
padId = urlParts[urlParts.length-2];
|
||||
padId = decodeURIComponent(urlParts[urlParts.length-2]);
|
||||
|
||||
//set the title
|
||||
document.title = document.title + " | " + padId;
|
||||
|
@ -271,7 +271,11 @@
|
|||
<!-- termporary place holder-->
|
||||
<a id = "returnbutton">Return to pad</a>
|
||||
<script>
|
||||
$("#returnbutton").attr("href", document.referrer);
|
||||
if(document.referrer.length > 0 && document.referrer.substring(document.referrer.lastIndexOf("/")-1,document.referrer.lastIndexOf("/")) === "p") {
|
||||
$("#returnbutton").attr("href", document.referrer);
|
||||
} else {
|
||||
$("#returnbutton").attr("href", document.location.href.substring(0,document.location.href.lastIndexOf("/")));
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue