diff --git a/static/js/ace.js b/static/js/ace.js index ffe00b078..3f52d315f 100644 --- a/static/js/ace.js +++ b/static/js/ace.js @@ -370,3 +370,7 @@ function Ace2Editor() return editor; } + +if (typeof exports !== 'undefined') { +exports.Ace2Editor = Ace2Editor; +} diff --git a/static/js/ace2_common.js b/static/js/ace2_common.js index 1414f855a..0918189c9 100644 --- a/static/js/ace2_common.js +++ b/static/js/ace2_common.js @@ -147,7 +147,19 @@ function htmlPrettyEscape(str) }).replace(/\r?\n/g, '\\n'); } -if (typeof exports !== "undefined") -{ - exports.map = map; +if (typeof exports !== 'undefined') { +exports.isNodeText = isNodeText; +exports.object = object; +exports.extend = extend; +exports.forEach = forEach; +exports.map = map; +exports.filter = filter; +exports.isArray = isArray; +exports.browser = browser; +exports.getAssoc = getAssoc; +exports.setAssoc = setAssoc; +exports.binarySearch = binarySearch; +exports.binarySearchInfinite = binarySearchInfinite; +exports.htmlPrettyEscape = htmlPrettyEscape; +exports.map = map; } diff --git a/static/js/ace2_inner.js b/static/js/ace2_inner.js index ec0d5dc45..ea6d7cbe2 100644 --- a/static/js/ace2_inner.js +++ b/static/js/ace2_inner.js @@ -5858,3 +5858,7 @@ function OUTER(gscope) }; OUTER(this); + +if (typeof exports !== 'undefined') { +exports.OUTER = OUTER; // This is probably unimportant. +} diff --git a/static/js/broadcast.js b/static/js/broadcast.js index 865574abd..edfeef9c6 100644 --- a/static/js/broadcast.js +++ b/static/js/broadcast.js @@ -758,3 +758,7 @@ function loadBroadcastJS() receiveAuthorData(clientVars.historicalAuthorData); } + +if (typeof exports !== 'undefined') { +exports.loadBroadcastJS = loadBroadcastJS; +} diff --git a/static/js/broadcast_revisions.js b/static/js/broadcast_revisions.js index 33a2f9dfa..f60e58bb8 100644 --- a/static/js/broadcast_revisions.js +++ b/static/js/broadcast_revisions.js @@ -125,3 +125,7 @@ function loadBroadcastRevisionsJS() }; } } + +if (typeof exports !== 'undefined') { +exports.loadBroadcastRevisionsJS = loadBroadcastRevisionsJS; +} diff --git a/static/js/broadcast_slider.js b/static/js/broadcast_slider.js index af5a50411..1d9f4928e 100644 --- a/static/js/broadcast_slider.js +++ b/static/js/broadcast_slider.js @@ -496,3 +496,7 @@ function loadBroadcastSliderJS() $("#viewlatest").html(loc == BroadcastSlider.getSliderLength() ? "Viewing latest content" : "View latest content"); }) } + +if (typeof exports !== 'undefined') { +exports.loadBroadcastSliderJS = loadBroadcastSliderJS; +} diff --git a/static/js/changesettracker.js b/static/js/changesettracker.js index cc7f64623..60c73d3d5 100644 --- a/static/js/changesettracker.js +++ b/static/js/changesettracker.js @@ -207,3 +207,7 @@ function makeChangesetTracker(scheduler, apool, aceCallbacksProvider) }; } + +if (typeof exports !== 'undefined') { +exports.makeChangesetTracker = makeChangesetTracker; +} diff --git a/static/js/chat.js b/static/js/chat.js index 71cd0c69d..1636ab690 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -172,3 +172,7 @@ var chat = (function() return self; }()); + +if (typeof exports !== 'undefined') { +exports.chat = chat; +} diff --git a/static/js/collab_client.js b/static/js/collab_client.js index bb2351fc3..3a40fba17 100644 --- a/static/js/collab_client.js +++ b/static/js/collab_client.js @@ -722,3 +722,8 @@ function selectElementContents(elem) } } } + +if (typeof exports !== 'undefined') { +exports.getCollabClient = getCollabClient; +exports.selectElementContents = selectElementContents; +} diff --git a/static/js/colorutils.js b/static/js/colorutils.js index 92d8da719..1fc452b6a 100644 --- a/static/js/colorutils.js +++ b/static/js/colorutils.js @@ -119,3 +119,7 @@ colorutils.blend = function(c1, c2, t) { return [colorutils.scale(t, c1[0], c2[0]), colorutils.scale(t, c1[1], c2[1]), colorutils.scale(t, c1[2], c2[2])]; } + +if (typeof exports !== 'undefined') { +exports.colorutils = colorutils; +} diff --git a/static/js/contentcollector.js b/static/js/contentcollector.js index 883ca09f0..e5a90586c 100644 --- a/static/js/contentcollector.js +++ b/static/js/contentcollector.js @@ -692,3 +692,8 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class return cc; } + +if (typeof exports !== 'undefined') { +exports.sanitizeUnicode = sanitizeUnicode; +exports.makeContentCollector = makeContentCollector; +} diff --git a/static/js/cssmanager.js b/static/js/cssmanager.js index b8208b83f..1d45f3024 100644 --- a/static/js/cssmanager.js +++ b/static/js/cssmanager.js @@ -118,3 +118,7 @@ function makeCSSManager(emptyStylesheetTitle, top) } }; } + +if (typeof exports !== 'undefined') { +exports.makeCSSManager = makeCSSManager; +} diff --git a/static/js/cssmanager_client.js b/static/js/cssmanager_client.js index 60bf9f8c5..3db467e31 100644 --- a/static/js/cssmanager_client.js +++ b/static/js/cssmanager_client.js @@ -114,3 +114,7 @@ function makeCSSManager(emptyStylesheetTitle) } }; } + +if (typeof exports !== 'undefined') { +exports.makeCSSManager = makeCSSManager; +} diff --git a/static/js/domline.js b/static/js/domline.js index 84aeb4a81..7ebf5b350 100644 --- a/static/js/domline.js +++ b/static/js/domline.js @@ -310,3 +310,7 @@ domline.processSpaces = function(s, doesWrap) } return parts.join(''); }; + +if (typeof exports !== 'undefined') { +exports.domline = domline; +} diff --git a/static/js/domline_client.js b/static/js/domline_client.js index 9f47dae54..e995140f4 100644 --- a/static/js/domline_client.js +++ b/static/js/domline_client.js @@ -309,3 +309,7 @@ domline.processSpaces = function(s, doesWrap) } return parts.join(''); }; + +if (typeof exports !== 'undefined') { +exports.domline = domline; +} diff --git a/static/js/draggable.js b/static/js/draggable.js index 7bf523eb5..1d0ddb4c3 100644 --- a/static/js/draggable.js +++ b/static/js/draggable.js @@ -193,3 +193,7 @@ function makeResizableHPane(left, sep, right, minLeft, minRight, sepWidth, sepOf } }); } + +if (typeof exports !== 'undefined') { +exports.makeDraggable = makeDraggable; +} diff --git a/static/js/easysync2.js b/static/js/easysync2.js index 17ab585d9..81a416b25 100644 --- a/static/js/easysync2.js +++ b/static/js/easysync2.js @@ -2508,3 +2508,8 @@ Changeset.followAttributes = function(att1, att2, pool) } return buf.toString(); }; + +if (typeof exports !== 'undefined') { +exports.Changeset = Changeset; +exports.AttribPool = AttribPool; +} diff --git a/static/js/easysync2_client.js b/static/js/easysync2_client.js index 3611da233..5745110e6 100644 --- a/static/js/easysync2_client.js +++ b/static/js/easysync2_client.js @@ -2269,3 +2269,8 @@ Changeset.inverse = function(cs, lines, alines, pool) return Changeset.checkRep(builder.toString()); }; + +if (typeof exports !== 'undefined') { +exports.Changeset = Changeset; +exports.AttribPool = AttribPool; +} diff --git a/static/js/linestylefilter.js b/static/js/linestylefilter.js index 13a746186..e990a68bc 100644 --- a/static/js/linestylefilter.js +++ b/static/js/linestylefilter.js @@ -352,3 +352,7 @@ linestylefilter.populateDomLine = function(textLine, aline, apool, domLineObj) func = linestylefilter.getLineStyleFilter(text.length, aline, func, apool); func(text, ''); }; + +if (typeof exports !== 'undefined') { +exports.linestylefilter = linestylefilter; +} diff --git a/static/js/linestylefilter_client.js b/static/js/linestylefilter_client.js index 9fd2a3f8c..a4536490f 100644 --- a/static/js/linestylefilter_client.js +++ b/static/js/linestylefilter_client.js @@ -350,3 +350,7 @@ linestylefilter.populateDomLine = function(textLine, aline, apool, domLineObj) func = linestylefilter.getLineStyleFilter(text.length, aline, func, apool); func(text, ''); }; + +if (typeof exports !== 'undefined') { +exports.linestylefilter = linestylefilter; +} diff --git a/static/js/pad2.js b/static/js/pad2.js index 5872b7a11..8a2c33847 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -953,3 +953,16 @@ var alertBar = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.settings = settings; +exports.createCookie = createCookie; +exports.readCookie = readCookie; +exports.randomString = randomString; +exports.getParams = getParams; +exports.getUrlVars = getUrlVars; +exports.savePassword = savePassword; +exports.handshake = handshake; +exports.pad = pad; +exports.alertBar = alertBar; +} diff --git a/static/js/pad_connectionstatus.js b/static/js/pad_connectionstatus.js index d35eb02d6..bec359c36 100644 --- a/static/js/pad_connectionstatus.js +++ b/static/js/pad_connectionstatus.js @@ -85,3 +85,7 @@ var padconnectionstatus = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padconnectionstatus = padconnectionstatus; +} diff --git a/static/js/pad_cookie.js b/static/js/pad_cookie.js index 64211750d..d8eb464c7 100644 --- a/static/js/pad_cookie.js +++ b/static/js/pad_cookie.js @@ -126,3 +126,7 @@ var padcookie = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padcookie = padcookie; +} diff --git a/static/js/pad_docbar.js b/static/js/pad_docbar.js index c67ca55c4..09315c778 100644 --- a/static/js/pad_docbar.js +++ b/static/js/pad_docbar.js @@ -456,3 +456,7 @@ var paddocbar = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.paddocbar = paddocbar; +} diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index 6cd5163de..6754e99c2 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -230,3 +230,7 @@ var padeditbar = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padeditbar = padeditbar; +} diff --git a/static/js/pad_editor.js b/static/js/pad_editor.js index 6daf5e7de..929112bbf 100644 --- a/static/js/pad_editor.js +++ b/static/js/pad_editor.js @@ -150,3 +150,7 @@ var padeditor = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padeditor = padeditor; +} diff --git a/static/js/pad_impexp.js b/static/js/pad_impexp.js index 23b7134c0..638991a64 100644 --- a/static/js/pad_impexp.js +++ b/static/js/pad_impexp.js @@ -325,3 +325,7 @@ var padimpexp = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padimpexp = padimpexp; +} diff --git a/static/js/pad_modals.js b/static/js/pad_modals.js index cf9d04355..d5e7811b9 100644 --- a/static/js/pad_modals.js +++ b/static/js/pad_modals.js @@ -364,3 +364,7 @@ var padmodals = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padmodals = padmodals; +} diff --git a/static/js/pad_savedrevs.js b/static/js/pad_savedrevs.js index 487e85f1a..7aadea71e 100644 --- a/static/js/pad_savedrevs.js +++ b/static/js/pad_savedrevs.js @@ -518,3 +518,7 @@ var padsavedrevs = (function() }; return self; }()); + +if (typeof exports !== 'undefined') { +exports.padsavedrevs = padsavedrevs; +} diff --git a/static/js/pad_userlist.js b/static/js/pad_userlist.js index 748674916..965132258 100644 --- a/static/js/pad_userlist.js +++ b/static/js/pad_userlist.js @@ -805,3 +805,7 @@ function showColorPicker() $($("#colorpickerswatches li")[myUserInfo.colorId]).addClass("picked"); //seems weird } } + +if (typeof exports !== 'undefined') { +exports.paduserlist = paduserlist; +} diff --git a/static/js/pad_utils.js b/static/js/pad_utils.js index 9083fa9b6..3c73aa069 100644 --- a/static/js/pad_utils.js +++ b/static/js/pad_utils.js @@ -486,3 +486,7 @@ window.onerror = function test (msg, url, linenumber) return false; }; + +if (typeof exports !== 'undefined') { +exports.padutils = padutils; +} diff --git a/static/js/plugins.js b/static/js/plugins.js index 741934620..2cf0e0e26 100644 --- a/static/js/plugins.js +++ b/static/js/plugins.js @@ -31,3 +31,7 @@ plugins = { }).join(sep || ""); } }; + +if (typeof exports !== 'undefined') { +exports.plugins = plugins; +} diff --git a/static/js/skiplist.js b/static/js/skiplist.js index c9654be46..995cd6bc7 100644 --- a/static/js/skiplist.js +++ b/static/js/skiplist.js @@ -488,3 +488,7 @@ that is a string. } return self; } + +if (typeof exports !== 'undefined') { +exports.newSkipList = newSkipList; +} diff --git a/static/js/undomodule.js b/static/js/undomodule.js index 3891629aa..a0073e19e 100644 --- a/static/js/undomodule.js +++ b/static/js/undomodule.js @@ -21,7 +21,7 @@ */ -undoModule = (function() +var undoModule = (function() { var stack = (function() { @@ -329,3 +329,7 @@ undoModule = (function() apool: null }; // apool is filled in by caller })(); + +if (typeof exports !== 'undefined') { +exports.undoModule = undoModule; +} diff --git a/static/js/virtual_lines.js b/static/js/virtual_lines.js index ece96b149..32fc58875 100644 --- a/static/js/virtual_lines.js +++ b/static/js/virtual_lines.js @@ -384,3 +384,7 @@ function makeVirtualLineView(lineNode) } } + +if (typeof exports !== 'undefined') { +exports.makeVirtualLineView = makeVirtualLineView; +}