diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 738d1ab70..986630487 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -162,24 +162,23 @@ define([ /* pushing back over the wire is necessary, but it can result in a feedback loop, which we call a browser fight */ - if (module.logFights) { - // what changed? - var op = TextPatcher.diff(newContentStrNoMeta, newContent2StrNoMeta); - // log the changes - TextPatcher.log(newContentStrNoMeta, op); - var sop = JSON.stringify(TextPatcher.format(newContentStrNoMeta, op)); - - var index = module.fights.indexOf(sop); - if (index === -1) { - module.fights.push(sop); - console.log("Found a new type of browser disagreement"); - console.log("You can inspect the list in your " + - "console at `REALTIME_MODULE.fights`"); - console.log(module.fights); - } else { - console.log("Encountered a known browser disagreement: " + - "available at `REALTIME_MODULE.fights[%s]`", index); - } + // what changed? + var op = TextPatcher.diff(newContentStrNoMeta, newContent2StrNoMeta); + // log the changes + TextPatcher.log(newContentStrNoMeta, op); + var sop = JSON.stringify(TextPatcher.format(newContentStrNoMeta, op)); + + var fights = window.CryptPad_fights = window.CryptPad_fights || []; + var index = fights.indexOf(sop); + if (index === -1) { + fights.push(sop); + console.log("Found a new type of browser disagreement"); + console.log("You can inspect the list in your " + + "console at `REALTIME_MODULE.fights`"); + console.log(fights); + } else { + console.log("Encountered a known browser disagreement: " + + "available at `REALTIME_MODULE.fights[%s]`", index); } } }