Give cryptpad a proper main page

This commit is contained in:
Caleb James DeLisle
2015-01-28 17:58:55 +01:00
parent 1cd7c4c063
commit 4a63ba7df3
3 changed files with 4359 additions and 7 deletions

View File

@@ -27,12 +27,16 @@ define([
};
$(function () {
if (window.location.href.indexOf('#') === -1) {
window.location.href = window.location.href + '#' + genKey();
}
$(window).on('hashchange', function() {
window.location.reload();
});
if (window.location.href.indexOf('#') === -1) {
$('#create-pad').click(function (ev) {
ev.preventDefault();
window.location.href = window.location.href + '#' + genKey();
});
return;
}
var key = parseKey(window.location.hash.substring(1));
var editor = Ckeditor.replace('editor1', {
removeButtons: 'Source,Maximize',