Minor refactoring of /pad/ ; moved /*/main.js into a common file ; framework'd /code/
This commit is contained in:
@@ -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....
|
||||
|
||||
Reference in New Issue
Block a user