2011-07-24 16:32:32 +00:00
<!doctype html>
2011-07-24 16:34:38 +00:00
< html lang = "en" >
2011-06-20 10:44:04 +00:00
< head >
2011-07-24 16:32:32 +00:00
< meta charset = "utf-8" >
2011-07-24 16:34:38 +00:00
< meta name = "robots" content = "noindex, nofollow" >
2011-06-20 10:44:04 +00:00
< title > Etherpad Lite Timeslider< / title >
2011-07-25 11:35:38 +00:00
< link rel = "stylesheet" href = "../../static/css/pad.css" >
2011-07-24 16:33:46 +00:00
< link rel = "stylesheet" href = "../../static/css/timeslider.css" >
2011-06-20 10:44:04 +00:00
< style type = "text/css" title = "dynamicsyntax" > < / style >
2011-07-26 16:39:25 +00:00
2012-01-16 06:07:45 +00:00
< script type = "text/javascript" src = "../../static/js/require-kernel.js" > < / script >
2011-07-26 16:39:25 +00:00
< script type = "text/javascript" src = "../../socket.io/socket.io.js" > < / script >
< script type = "text/javascript" src = "../../minified/timeslider.js" > < / script >
2011-07-30 15:33:35 +00:00
< link href = "../../static/custom/timeslider.css" rel = "stylesheet" >
< script src = "../../static/custom/timeslider.js" > < / script >
2011-07-24 16:32:32 +00:00
< script >
2011-06-20 10:44:04 +00:00
// < ![CDATA[
var clientVars = {};
2012-01-16 10:10:34 +00:00
/* TODO: These globals shouldn't exist. */
padeditbar = require('/pad_editbar').padeditbar;
padimpexp = require('/pad_impexp').padimpexp;
2011-06-20 10:44:04 +00:00
function createCookie(name,value,days)
{
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length ; i + + ) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function randomString() {
2011-07-31 10:48:06 +00:00
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
2011-06-20 10:44:04 +00:00
var string_length = 20;
var randomstring = '';
for (var i=0; i< string_length ; i + + ) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
return "t." + randomstring;
}
2011-12-18 05:18:35 +00:00
var socket, token, padId, export_links;
2011-06-20 10:44:04 +00:00
2011-07-31 16:21:01 +00:00
$(document).ready(function ()
2011-06-20 10:44:04 +00:00
{
2011-07-31 16:21:01 +00:00
//start the costum js
2011-08-01 11:08:18 +00:00
if(typeof costumStart == "function") costumStart();
2011-07-31 16:21:01 +00:00
2011-06-20 14:59:27 +00:00
//get the padId out of the url
2011-07-26 15:46:28 +00:00
var urlParts= document.location.pathname.split("/");
2011-11-28 19:26:36 +00:00
padId = decodeURIComponent(urlParts[urlParts.length-2]);
2011-06-20 10:44:04 +00:00
//set the title
2011-12-16 20:41:11 +00:00
document.title = document.title + " | " + padId.replace(/_+/g, ' ');
2011-06-20 10:44:04 +00:00
//ensure we have a token
token = readCookie("token");
if(token == null)
{
token = randomString();
createCookie("token", token, 60);
}
2011-07-05 18:16:45 +00:00
var loc = document.location;
//get the correct port
var port = loc.port == "" ? (loc.protocol == "https:" ? 443 : 80) : loc.port;
//create the url
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
//find out in which subfolder we are
2011-07-06 17:51:41 +00:00
var resource = loc.pathname.substr(1,loc.pathname.indexOf("/p/")) + "socket.io";
2011-07-05 18:16:45 +00:00
2011-06-20 10:44:04 +00:00
//build up the socket io connection
2011-07-05 18:16:45 +00:00
socket = io.connect(url, {resource: resource});
2011-06-20 10:44:04 +00:00
2011-06-20 14:59:27 +00:00
//send the ready message once we're connected
2011-06-20 10:44:04 +00:00
socket.on('connect', function()
{
2011-06-20 14:37:41 +00:00
sendSocketMsg("CLIENT_READY", {});
2011-06-20 10:44:04 +00:00
});
2011-06-20 14:59:27 +00:00
//route the incoming messages
2011-06-20 10:44:04 +00:00
socket.on('message', function(message)
{
if(window.console) console.log(message);
if(message.type == "CLIENT_VARS")
{
handleClientVars(message);
}
2011-06-20 14:37:41 +00:00
else if(message.type == "CHANGESET_REQ")
{
changesetLoader.handleSocketResponse(message);
}
2011-08-16 14:53:09 +00:00
else if(message.accessStatus)
{
$("body").html("< h2 > You have no permission to access this pad< / h2 > ")
}
2011-06-20 10:44:04 +00:00
});
2011-12-18 05:18:35 +00:00
//get all the export links
export_links = $('#export > .exportlink')
2011-06-20 10:44:04 +00:00
});
2011-06-20 14:59:27 +00:00
//sends a message over the socket
2011-06-20 14:37:41 +00:00
function sendSocketMsg(type, data)
{
2011-08-16 14:53:09 +00:00
var sessionID = readCookie("sessionID");
var password = readCookie("password");
2011-06-20 14:37:41 +00:00
var msg = { "component" : "timeslider",
"type": type,
"data": data,
"padId": padId,
"token": token,
2011-08-16 14:53:09 +00:00
"sessionID": sessionID,
"password": password,
2011-06-20 14:37:41 +00:00
"protocolVersion": 2};
2011-06-23 13:09:41 +00:00
socket.json.send(msg);
2011-06-20 14:37:41 +00:00
}
2011-06-20 10:44:04 +00:00
var fireWhenAllScriptsAreLoaded = [];
function handleClientVars(message)
{
//save the client Vars
clientVars = message.data;
2011-06-20 14:59:27 +00:00
//load all script that doesn't work without the clientVars
2012-01-16 10:10:34 +00:00
require('/broadcast_slider').loadBroadcastSliderJS();
require('/broadcast_revisions').loadBroadcastRevisionsJS();
require('/broadcast').loadBroadcastJS();
2011-12-18 05:18:35 +00:00
//initialize export ui
padimpexp.init();
//change export urls when the slider moves
var export_rev_regex = /(\/\d+)?\/export/
BroadcastSlider.onSlider(function(revno)
{
export_links.each(function()
{
this.setAttribute('href', this.href.replace(export_rev_regex, '/' + revno + '/export'));
});
});
2011-06-20 10:44:04 +00:00
2011-06-20 14:59:27 +00:00
//fire all start functions of these scripts, formerly fired with window.load
2011-06-20 10:44:04 +00:00
for(var i=0;i < fireWhenAllScriptsAreLoaded.length ; i + + )
{
fireWhenAllScriptsAreLoaded[i]();
}
}
// ]]>
< / script >
< / head >
< body id = "padbody" class = "timeslider limwidth nonpropad nonprouser" >
< div id = "padpage" >
< div id = "padtop" >
< div class = "topbar" >
< div class = "topbarleft" >
<!-- -->
< / div >
< div class = "topbarright" >
<!-- -->
< / div >
< div class = "topbarcenter" >
< a href = "/" class = "topbarBrand" > Etherpad v1.1< / a > < a href = "http://etherpad.org"
2011-07-05 18:16:45 +00:00
class="EtherpadLink">Etherpad is< / a > < a href = "../../static/LICENSE" class =
2011-06-20 10:44:04 +00:00
"Licensing">free software< / a >
< div class = "fullscreen" onclick = "$('body').toggleClass('maximized');" >
Full screen
< / div > < a href = "javascript:void(0);" onclick =
"$('body').toggleClass('maximized');" class="topbarmaximize" title=
"Toggle maximization">< / a >
< / div >
< div class = "specialkeyarea" >
<!-- -->
< / div >
< / div >
< div id = "alertbar" >
< div id = "servermsg" >
< h3 > Server Notice< span id = "servermsgdate" > <!-- --> < / span > :< / h3 > < a id =
"hidetopmsg" href="javascript:%20void%20pad.hideServerMessage()" name=
"hidetopmsg">hide< / a >
< p id = "servermsgtext" > <!-- --> < / p >
< / div >
< / div >
< div id = "navigation" > < / div >
2011-06-21 16:02:03 +00:00
2011-06-20 10:44:04 +00:00
< div id = "docbar" class = "menu docbar" >
< table border = "0" cellpadding = "0" cellspacing = "0" width = "100%" id = "docbartable"
class="docbartable">
< tr >
2011-07-05 18:16:45 +00:00
< td > < img src = "../../static/img/roundcorner_left.gif" / > < / td >
2011-06-20 10:44:04 +00:00
< td id = "docbarpadtitle" class = "docbarpadtitle" title =
"Public Pad: Public Pad">< span > Public Pad< / span > < / td >
< td width = "100%" > < / td >
2011-07-05 18:16:45 +00:00
< td > < img src = "../../static/img/roundcorner_right.gif" / > < / td >
2011-06-20 10:44:04 +00:00
< / tr >
< / table >
< / div > <!-- /docbar -->
< / div >
< div id = "timeslider-wrapper" >
< div id = "error" style = "display: none" >
It looks like you're having connection troubles. < a href =
"/ep/pad/view/test/latest">Reconnect now< / a > .
< / div >
< div id = "timeslider" unselectable = "on" style = "display: none" >
< div id = "timeslider-left" > < / div >
< div id = "timeslider-right" > < / div >
2011-07-25 16:26:56 +00:00
< div id = "timer" > < / div >
2011-06-20 10:44:04 +00:00
< div id = "timeslider-slider" >
< div id = "ui-slider-handle" > < / div >
< div id = "ui-slider-bar" > < / div >
< / div >
< div id = "playpause_button" >
< div id = "playpause_button_icon" class = "" > < / div >
< / div >
< div id = "steppers" >
< div class = "stepper" id = "leftstep" > < / div >
< div class = "stepper" id = "rightstep" > < / div >
< / div >
< / div >
< / div >
<!-- <div id="rightbars" style="top: 95px;">
< div id = "rightbar" > < a href = "/ep/pad/view/c6fg9GM51V/latest" id = "viewlatest" > Viewing latest content< / a > < br >
< a thref = "/ep/pad/view/c6fg9GM51V/rev.%revision%" href = "/ep/pad/view/c6fg9GM51V/rev.0" class = "tlink" > Link to this version< / a >
< br > < a thref = "/ep/pad/view/ro.fw470Orpi4T/rev.%revision%" href = "/ep/pad/view/ro.fw470Orpi4T/rev.0" class = "tlink" > Link to read-only page< / a > < br > < a href = "/c6fg9GM51V" > Edit this pad< / a >
< h2 > Download as< / h2 >
2011-07-05 18:16:45 +00:00
< img src = "../../static/img/may09/html.gif" > < a thref = "/ep/pad/export/c6fg9GM51V/rev.%revision%?format=html" href = "/ep/pad/export/c6fg9GM51V/rev.0?format=html" class = "tlink" > HTML< / a > < br >
< img src = "../../static/img/may09/txt.gif" > < a thref = "/ep/pad/export/c6fg9GM51V/rev.%revision%?format=txt" href = "/ep/pad/export/c6fg9GM51V/rev.0?format=txt" class = "tlink" > Plain text< / a > < br >
< img src = "../../static/img/may09/doc.gif" > < a thref = "/ep/pad/export/c6fg9GM51V/rev.%revision%?format=doc" href = "/ep/pad/export/c6fg9GM51V/rev.0?format=doc" class = "tlink" > Microsoft Word< / a > < br >
< img src = "../../static/img/may09/pdf.gif" > < a thref = "/ep/pad/export/c6fg9GM51V/rev.%revision%?format=pdf" href = "/ep/pad/export/c6fg9GM51V/rev.0?format=pdf" class = "tlink" > PDF< / a >
2011-06-20 10:44:04 +00:00
< / div >
< div id = "legend" >
< h2 > Authors< / h2 >
< table cellspacing = "0" cellpadding = "0" border = "0" id = "authorstable" > < tbody > < tr > < td style = "color:#999; padding-left: 10px" colspan = "2" > No Authors< / td > < / tr > < / tbody > < / table >
< / div >
< / div > -->
< div id = "padmain" >
< div id = "padeditor" >
< div id = "editbar" class = "editbar disabledtoolbar" >
< div id = "editbarinner" class = "editbarinner" >
< div id = "editbarleft" class = "editbarleft" >
<!-- -->
< / div >
< div id = "editbarright" class = "editbarright" >
2011-06-21 14:08:36 +00:00
<!-- termporary place holder -->
2011-12-18 05:18:35 +00:00
< ul >
< li onClick = "window.padeditbar.toolbarClick('import_export');return false;" >
< a id = "exportlink" title = "Export to different document formats" >
< div class = "buttonicon" style = "background-position:0px -68px" > < / div >
< / a >
< / li >
< / ul >
2011-06-30 11:16:04 +00:00
< a id = "returnbutton" > Return to pad< / a >
< script >
2011-08-30 14:47:16 +00:00
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("/")));
}
2011-06-30 11:16:04 +00:00
< / script >
2011-06-20 10:44:04 +00:00
< / div >
< div id = "editbarinner" class = "editbarinner" >
< table cellpadding = "0" cellspacing = "0" border = "0" id = "editbartable" class =
"editbartable">
< tr >
< td >
2011-07-25 23:16:00 +00:00
< h1 >
< span id = "revision_label" > < / span >
< span id = "revision_date" > < / span >
< / h1 >
2011-06-20 10:44:04 +00:00
< / td >
< td width = "100%" > < / td >
< / tr >
< / table >
< table cellpadding = "0" cellspacing = "0" border = "0" id = "editbarsavetable"
class="editbarsavetable">
< tr >
< td > < / td >
< / tr >
< / table >
< / div >
< / div >
< / div >
< div id = "editorcontainerbox" >
< div id = "padcontent" >
< / div >
< / div >
< / div > <!-- /padeditor -->
< / div > <!-- /padmain -->
< / div > <!-- /padpage -->
< div id = "modaloverlay" >
< div id = "modaloverlay-inner" >
<!-- -->
< / div >
< / div >
< div id = "mainmodals" > < / div >
2011-12-18 05:18:35 +00:00
<!-- export code -->
< div id = "importexport" >
< div id = "export" >
Export current version as:
< a id = "exporthtmla" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exporthtml" > HTML< / div > < / a >
< a id = "exportplaina" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exportplain" > Plain text< / div > < / a >
< a id = "exportworda" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exportword" > Microsoft Word< / div > < / a >
< a id = "exportpdfa" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exportpdf" > PDF< / div > < / a >
< a id = "exportopena" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exportopen" > OpenDocument< / div > < / a >
< a id = "exportdokuwikia" target = "_blank" class = "exportlink" > < div class = "exporttype" id = "exportdokuwiki" > DokuWiki text< / div > < / a >
< a id = "exportwordlea" target = "_blank" onClick = "padimpexp.export2Wordle();return false;" class = "exportlink" > < div class = "exporttype" id = "exportwordle" > Wordle< / div > < / a >
< form id = "wordlepost" name = "wall" action = "http://wordle.net/advanced" method = "POST" style = "margin-left:0px;" >
< div id = "hidetext" style = "" > < textarea id = "text" name = "text" id = "text" style = "display:none;" > Coming soon!< / textarea > < / div >
< / form >
< / div >
< / div >
2011-06-20 10:44:04 +00:00
< / body >
< / html >