Do not share the title in the doc if it is the default title

This commit is contained in:
yflory
2016-10-03 16:05:39 +02:00
parent 0f672f19f5
commit 17b4f91810
4 changed files with 126 additions and 101 deletions

View File

@@ -295,6 +295,10 @@ define([
while (!isNameAvailable(name + ' - ' + untitledIndex, parsed, recentPads)) { untitledIndex++; }
return name + ' - ' + untitledIndex;
};
var isDefaultName = common.isDefaultName = function (parsed, title) {
var name = getDefaultName(parsed, []);
return title.slice(0, name.length) === name;
};
var makePad = function (href, title) {
var now = ''+new Date();