|
|
@ -3,7 +3,8 @@ define([
|
|
|
|
'/common/sframe-common-codemirror.js',
|
|
|
|
'/common/sframe-common-codemirror.js',
|
|
|
|
'/customize/messages.js',
|
|
|
|
'/customize/messages.js',
|
|
|
|
'/bower_components/chainpad/chainpad.dist.js',
|
|
|
|
'/bower_components/chainpad/chainpad.dist.js',
|
|
|
|
], function (Util, SFCodeMirror, Messages, ChainPad) {
|
|
|
|
'/common/inner/common-mediatag.js',
|
|
|
|
|
|
|
|
], function (Util, SFCodeMirror, Messages, ChainPad, MT) {
|
|
|
|
var Markers = {};
|
|
|
|
var Markers = {};
|
|
|
|
|
|
|
|
|
|
|
|
/* TODO Known Issues
|
|
|
|
/* TODO Known Issues
|
|
|
@ -38,7 +39,17 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uid = Number(uid);
|
|
|
|
uid = Number(uid);
|
|
|
|
var name = Util.fixHTML(author.name || Messages.anonymous);
|
|
|
|
var name = Util.fixHTML((author.name || "").trim());
|
|
|
|
|
|
|
|
var animal;
|
|
|
|
|
|
|
|
if ((!name || name === Messages.anonymous) && typeof(author.uid) === 'string') {
|
|
|
|
|
|
|
|
animal = MT.getPseudorandomAnimal(author.uid);
|
|
|
|
|
|
|
|
if (animal) {
|
|
|
|
|
|
|
|
name = animal + ' ' + Messages.anonymous;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
name = Messages.anonymous;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var col = Util.hexToRGB(author.color);
|
|
|
|
var col = Util.hexToRGB(author.color);
|
|
|
|
var rgba = 'rgba('+col[0]+','+col[1]+','+col[2]+','+Env.opacity+');';
|
|
|
|
var rgba = 'rgba('+col[0]+','+col[1]+','+col[2]+','+Env.opacity+');';
|
|
|
|
return Env.editor.markText(from, to, {
|
|
|
|
return Env.editor.markText(from, to, {
|
|
|
@ -520,7 +531,8 @@ define([
|
|
|
|
Env.authormarks.authors[Env.myAuthorId] = {
|
|
|
|
Env.authormarks.authors[Env.myAuthorId] = {
|
|
|
|
name: userData.name,
|
|
|
|
name: userData.name,
|
|
|
|
curvePublic: userData.curvePublic,
|
|
|
|
curvePublic: userData.curvePublic,
|
|
|
|
color: userData.color
|
|
|
|
color: userData.color,
|
|
|
|
|
|
|
|
uid: userData.uid,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!old || (old.name === userData.name && old.color === userData.color)) { return; }
|
|
|
|
if (!old || (old.name === userData.name && old.color === userData.color)) { return; }
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|