Skip to content

Commit

Permalink
cruft: Remove unecessary consolelogs (ether#4141)
Browse files Browse the repository at this point in the history
  • Loading branch information
webzwo0i authored Jun 27, 2020
1 parent bbee833 commit b7dff55
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 28 deletions.
11 changes: 0 additions & 11 deletions src/static/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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++)
Expand All @@ -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
Expand Down Expand Up @@ -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++)
{
Expand All @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/static/js/collab_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/static/js/pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 0 additions & 2 deletions src/static/js/timeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion tests/frontend/specs/caret.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 0 additions & 2 deletions tests/frontend/specs/clear_authorship_colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
1 change: 0 additions & 1 deletion tests/frontend/specs/ordered_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions tests/frontend/specs/redo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion tests/frontend/specs/responsiveness.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion tests/frontend/specs/unordered_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b7dff55

Please sign in to comment.