cruft: Remove unecessary consolelogs (#4141)

pull/4142/head
webzwo0i 2020-06-27 21:12:06 +02:00 committed by GitHub
parent bbee833b89
commit b7dff552f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 0 additions and 28 deletions

View File

@ -100,7 +100,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
// remove spliced-out lines from DOM
for (var i = start; i < start + numRemoved && i < this.currentDivs.length; i++)
{
debugLog("removing", this.currentDivs[i].attr('id'));
this.currentDivs[i].remove();
}
@ -226,7 +225,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
function loadedNewChangeset(changesetForward, changesetBackward, revision, timeDelta)
{
var broadcasting = (BroadcastSlider.getSliderPosition() == revisionInfo.latest);
debugLog("broadcasting:", broadcasting, BroadcastSlider.getSliderPosition(), revisionInfo.latest, revision);
revisionInfo.addChangeset(revision, revision + 1, changesetForward, changesetBackward, timeDelta);
BroadcastSlider.setSliderLength(revisionInfo.latest);
if (broadcasting) applyChangeset(changesetForward, revision + 1, false, timeDelta);
@ -261,7 +259,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
padContents.currentRevision = revision;
padContents.currentTime += timeDelta * 1000;
debugLog('Time Delta: ', timeDelta)
updateTimer();
var authors = _.map(padContents.getActiveAuthors(), function(name)
@ -335,7 +332,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
padContents.targetRevision = newRevision;
var self = this;
var path = revisionInfo.getPath(padContents.currentRevision, newRevision);
debugLog('newRev: ', padContents.currentRevision, path);
hooks.aCallAll('goToRevisionEvent', {
rev: newRevision
@ -344,7 +340,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
if (path.status == 'complete')
{
var cs = path.changesets;
debugLog("status: complete, changesets: ", cs, "path:", path);
var changeset = cs[0];
var timeDelta = path.times[0];
for (var i = 1; i < cs.length; i++)
@ -356,7 +351,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
}
else if (path.status == "partial")
{
debugLog('partial');
var sliderLocation = padContents.currentRevision;
// callback is called after changeset information is pulled from server
// this may never get called, if the changeset has already been loaded
@ -475,7 +469,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
},
handleResponse: function(data, start, granularity, callback)
{
debugLog("response: ", data);
var pool = (new AttribPool()).fromJsonable(data.apool);
for (var i = 0; i < data.forwardsChangesets.length; i++)
{
@ -491,15 +484,12 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
},
handleMessageFromServer: function (obj)
{
debugLog("handleMessage:", arguments);
if (obj.type == "COLLABROOM")
{
obj = obj.data;
if (obj.type == "NEW_CHANGES")
{
debugLog(obj);
var changeset = Changeset.moveOpsToNewPool(
obj.changeset, (new AttribPool()).fromJsonable(obj.apool), padContents.apool);
@ -555,7 +545,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
padContents.currentDivs.push(div);
$("#innerdocbody").append(div);
}
debugLog(padContents.currentDivs);
});
// this is necessary to keep infinite loops of events firing,

View File

@ -272,8 +272,6 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
function handleMessageFromServer(evt)
{
if (window.console) console.log(evt);
if (!getSocket()) return;
if (!evt.data) return;
var wrapper = evt;

View File

@ -278,9 +278,6 @@ function handshake()
//if we haven't recieved the clientVars yet, then this message should it be
else if (!receivedClientVars && obj.type == "CLIENT_VARS")
{
//log the message
if (window.console) console.log(obj);
receivedClientVars = true;
//set some client vars
@ -353,8 +350,6 @@ function handshake()
//this message advices the client to disconnect
if (obj.disconnect)
{
console.warn("FORCED TO DISCONNECT");
console.warn(obj);
padconnectionstatus.disconnected(obj.disconnect);
socket.disconnect();

View File

@ -78,8 +78,6 @@ function init() {
//route the incoming messages
socket.on('message', function(message)
{
if(window.console) console.log(message);
if(message.type == "CLIENT_VARS")
{
handleClientVars(message);

View File

@ -334,6 +334,5 @@ function caretPosition($){
var pos = doc.getSelection();
pos.y = pos.anchorNode.parentElement.offsetTop;
pos.x = pos.anchorNode.parentElement.offsetLeft;
console.log(pos);
return pos;
}

View File

@ -39,7 +39,6 @@ describe("clear authorship colors button", function(){
$clearauthorshipcolorsButton.click();
// does the first divs span include an author class?
console.log(inner$("div span").first().attr("class"));
var hasAuthorClass = inner$("div span").first().attr("class").indexOf("author") !== -1;
//expect(hasAuthorClass).to.be(false);
@ -94,7 +93,6 @@ describe("clear authorship colors button", function(){
$clearauthorshipcolorsButton.click();
// does the first divs span include an author class?
console.log(inner$("div span").first().attr("class"));
var hasAuthorClass = inner$("div span").first().attr("class").indexOf("author") !== -1;
//expect(hasAuthorClass).to.be(false);

View File

@ -100,7 +100,6 @@ describe("assign ordered list", function(){
}).done(function(){
var $newSecondLine = inner$("div").first().next();
var hasOLElement = $newSecondLine.find("ol li").length === 1;
console.log($newSecondLine.find("ol"));
expect(hasOLElement).to.be(true);
expect($newSecondLine.text()).to.be("line 2");
var hasLineNumber = $newSecondLine.find("ol").attr("start") === 2;

View File

@ -25,7 +25,6 @@ describe("undo button then redo button", function(){
$redoButton.click(); // resends foo
helper.waitFor(function(){
console.log(inner$("div span").first().text());
return inner$("div span").first().text() === newString;
}).done(function(){
var finalValue = inner$("div").first().text();
@ -58,7 +57,6 @@ describe("undo button then redo button", function(){
inner$("#innerdocbody").trigger(e);
helper.waitFor(function(){
console.log(inner$("div span").first().text());
return inner$("div span").first().text() === newString;
}).done(function(){
var finalValue = inner$("div").first().text();

View File

@ -68,7 +68,6 @@ describe('Responsiveness of Editor', function() {
var end = Date.now(); // get the current time
var delay = end - start; // get the delay as the current time minus the start time
console.log('delay:', delay);
expect(delay).to.be.below(200);
done();
}, 1000);

View File

@ -97,7 +97,6 @@ describe("keep unordered list on enter key", function(){
}).done(function(){
var $newSecondLine = inner$("div").first().next();
var hasULElement = $newSecondLine.find("ul li").length === 1;
console.log($newSecondLine.find("ul").length);
expect(hasULElement).to.be(true);
expect($newSecondLine.text()).to.be("line 2");
done();