Minor refactoring of /pad/ ; moved /*/main.js into a common file ; framework'd /code/

This commit is contained in:
Caleb James DeLisle
2017-09-27 16:53:16 +02:00
parent 6dbc02e81a
commit f95acda758
8 changed files with 355 additions and 583 deletions

View File

@@ -289,6 +289,15 @@ define([
Object.freeze(funcs);
return { create: function (cb) {
// TODO(cjd): This is crap but this gets loaded multiple places by /code/ and it is
// not ok with being loaded more than once.
if (window.CryptPad_sframe_common) {
setTimeout(function () { cb(window.CryptPad_sframe_common); });
return;
}
window.CryptPad_sframe_common = funcs;
nThen(function (waitFor) {
SFrameChannel.create(window.parent, waitFor(function (sfc) { ctx.sframeChan = sfc; }), true);
// CpNfInner.start() should be here....