diff options
author | John McLear <john@mclear.co.uk> | 2013-04-12 14:34:07 +0100 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-04-12 14:34:07 +0100 |
commit | 337179fddd6f7a5cb00544029dd8623271fc6b98 (patch) | |
tree | 802c66b221d6cc15fb30da478c5ad2ca2bae3e96 /src/static/js | |
parent | f4de7f6a9068356a93beec43617d903458c0a784 (diff) | |
download | etherpad-lite-337179fddd6f7a5cb00544029dd8623271fc6b98.zip |
remove console logs and cruft
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/changesettracker.js | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/static/js/changesettracker.js b/src/static/js/changesettracker.js index 8444fb9c..d0c91e3d 100644 --- a/src/static/js/changesettracker.js +++ b/src/static/js/changesettracker.js @@ -176,7 +176,6 @@ function makeChangesetTracker(scheduler, apool, aceCallbacksProvider) , iterator = Changeset.opIterator(cs.ops) , op , assem = Changeset.mergingOpAssembler(); -console.log(cs.ops) while(iterator.hasNext()) { op = iterator.next() if(op.opcode == '+') { @@ -186,7 +185,10 @@ console.log(cs.ops) if(!attrNum) return attr = apool.getAttrib(attrNum) if(!attr) return - if('author' == attr[0] && !~newAttrs.indexOf(authorAttr)) {newAttrs += '*'+authorAttr; console.log('replacing author attribute ', attrNum, '(', attr[1], ') with', authorAttr) } + if('author' == attr[0] && !~newAttrs.indexOf(authorAttr)) { + newAttrs += '*'+authorAttr; + // console.log('replacing author attribute ', attrNum, '(', attr[1], ') with', authorAttr) + } else newAttrs += '*'+attrNum }) op.attribs = newAttrs @@ -194,30 +196,9 @@ console.log(cs.ops) assem.append(op) } assem.endDocument(); -console.log(assem.toString()) userChangeset = Changeset.pack(cs.oldLen, cs.newLen, assem.toString(), cs.charBank) Changeset.checkRep(userChangeset) -console.log(userChangeset) } -/* - // Make sure the actual author is the AuthorID - // We need to replace apool attrToNum value where the first value before - // the comma is author with authorId - var attrToNum = apool.attribToNum; - if(attrToNum){ - for (var attr in attrToNum){ - var splitAttr = attr.split(','); - var isAuthor = (splitAttr[0] === 'author'); // Is it an author val? - if (isAuthor){ - // We force write the author over a change, for sanity n stuff - var newValue = 'author,'+authorId; // Create a new value - var key = attrToNum[attr]; // Key is actually the value - delete apool.attribToNum[attr]; // Delete the old value - apool.attribToNum[newValue] = key; // Write a new value - } - } - }*/ - if (Changeset.isIdentity(userChangeset)) toSubmit = null; else toSubmit = userChangeset; } |