2011-08-16 23:25:42 +03:00
<!doctype html>
2011-07-25 15:45:04 -07:00
< html >
2011-11-14 00:29:51 +01:00
< title > Etherpad< / title >
2011-07-24 09:47:04 -07:00
< style >
2011-08-16 23:25:42 +03:00
*{ margin:0;padding:0; }
2011-07-24 09:47:04 -07:00
body {
2011-08-16 23:25:42 +03:00
background: rgba(0,0,0,.05);
color: #333;
font: 14px helvetica,sans-serif;
background: #ccc;
background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
overflow-x: hidden;
border-top: 8px solid rgba(51,51,51,.8)
2011-07-24 09:47:04 -07:00
}
#container {
2011-08-16 23:25:42 +03:00
text-shadow: 0 1px 1px #fff;
border-top: 1px solid #999;
margin-top: 160px;
width: 100%;
text-align: center;
padding: 15px;
background: #eee;
background: -webkit-linear-gradient(#fff,#ccc);
background: -moz-linear-gradient(#fff,#ccc);
background: -ms-linear-gradient(#fff,#ccc);
background: -o-linear-gradient(#fff,#ccc);
opacity: .9;
box-shadow: 0px 1px 8px rgba(0,0,0,0.3)
2011-07-24 09:47:04 -07:00
}
#button {
2011-08-16 23:25:42 +03:00
margin: 0 auto;
border-radius: 3px;
text-align: center;
font: 36px verdana,arial,sans-serif;
color: white;
text-shadow: 0 -1px 0 rgba(0,0,0,.8);
height: 70px;
line-height: 70px;
2011-11-10 00:06:43 +01:00
width: 500px;
2011-08-16 23:25:42 +03:00
background: #555;
background: -webkit-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -moz-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -ms-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -o-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
box-shadow: inset 0 1px 3px rgba(0,0,0,0.9)
}
2011-07-24 09:47:04 -07:00
#button:hover {
2011-08-16 23:25:42 +03:00
cursor: pointer;
background: #666;
background: -webkit-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
background: -moz-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
background: -ms-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747);
background: -o-linear-gradient(#707070,#666666 50%,#5B5B5B 51%,#474747)
2011-07-24 09:47:04 -07:00
}
#button:active {
2011-08-16 23:25:42 +03:00
box-shadow: inset 0 1px 12px rgba(0,0,0,0.9);
background: #444
2011-07-26 16:11:39 +03:00
}
2011-08-02 14:56:55 +03:00
#label {
2011-07-26 16:19:01 +03:00
text-align: left;
2011-07-26 16:17:45 +03:00
margin: 0 auto;
2011-11-10 00:06:43 +01:00
width: 500px
2011-08-16 23:25:42 +03:00
}
input {
vertical-align: middle;
font-weight: bold;
font-size: 15px
2011-07-26 16:11:39 +03:00
}
2011-07-24 09:47:04 -07:00
input[type="text"] {
2011-11-14 00:26:46 +01:00
width: 443px;
2011-08-16 23:25:42 +03:00
padding: 10px 47px 10px 10px;
background: #fff;
border: 1px solid #bbb;
outline: none;
border-radius: 3px;
text-shadow: 0 0 1px #fff
}
2011-07-24 09:47:04 -07:00
input[type="submit"] {
2011-08-16 23:25:42 +03:00
width: 45px;
margin-left: -50px;
padding: 8px
2011-07-24 09:47:04 -07:00
}
2011-08-16 23:25:42 +03:00
input[type="submit"]::-moz-focus-inner { border: 0 }
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
2011-07-24 09:47:04 -07:00
< / style >
2011-11-14 00:26:46 +01:00
< body onload = "document.mainform.padname.focus();" >
2011-08-16 23:25:42 +03:00
< link href = "static/custom/index.css" rel = "stylesheet" >
2011-08-02 15:06:09 +03:00
< script src = "static/custom/index.js" > < / script >
2011-11-14 00:26:46 +01:00
< div id = "container" >
2011-11-14 08:51:37 +01:00
< div id = "button" onclick = "go2Random()" title = "open a new pad with a generated random name like 'B3GYd74mn2yBH6'" > create new random pad< / div > < br > < div id = "label" > open an existing pad or create a new pad with the name< / div >
2011-11-14 00:26:46 +01:00
< form action = "#" name = "mainform" onsubmit = "go2Name();return false;" >
< input type = "text" name = "padname" id = "padname" autofocus >
< input type = "submit" value = "OK" >
< / form >
< / div >
< script >
2011-11-14 08:51:37 +01:00
function randomPadName()
2011-08-17 21:58:07 +03:00
{
2011-11-10 00:06:43 +01:00
var chars = "23456789ABCDEFGHJKLMNPQRSTUWXYZabcdefghijkmnopqrstuwxyz";
var string_length = 16;
2011-08-17 21:58:07 +03:00
var randomstring = '';
for (var i = 0; i < string_length ; i + + )
{
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum, rnum + 1);
2011-07-24 09:47:04 -07:00
}
2011-08-17 21:58:07 +03:00
return randomstring;
2011-07-24 09:47:04 -07:00
}
2011-11-14 08:51:37 +01:00
function go2Name()
{
var padname = document.getElementById("padname").value;
padname.length > 0 ? window.location = /** "p/" + **/ padname : alert("Please enter a name")
}
function go2Random()
{
var rnd = randomPadName();
var prefixedName = prompt( "You can prefix or modify your random pad name with some reasonable characters.\nSpecial characters will be removed or escaped.\n\n", "-"+rnd );
if ( prefixedName == "-" + rnd ) prefixedName = rnd;
var escPrefixedName = encodeURIComponent( prefixedName.replace( /\//, "" ) );
if ( prefixedName == null ) return;
if ( prefixedName == decodeURIComponent( escPrefixedName )
|| ( prefixedName != escPrefixedName
& & confirm( "You have used characters which are not allowed in Urls, and the padname will therefore be modified to "
+ decodeURIComponent( escPrefixedName )
+ ".\nDo you want to use this modifed name?" ) ) ) {
window.location = /** "p/" + **/ escPrefixedName;
} else {
return;
}
}
2011-11-10 22:42:30 +01:00
2011-08-17 21:58:07 +03:00
//start the costum js
if(typeof costumStart == "function") costumStart();
2011-08-16 23:25:42 +03:00
< / script >
2011-11-12 18:30:38 +00:00
< / body >
2011-08-16 23:25:42 +03:00
< / html >