commit
4f5ac851cc
|
@ -85,15 +85,20 @@ exports.extractHooks = function (parts, hook_set_name) {
|
||||||
|
|
||||||
if (exports.isClient) {
|
if (exports.isClient) {
|
||||||
exports.update = function (cb) {
|
exports.update = function (cb) {
|
||||||
|
// It appears that this response (see #620) may interrupt the current thread
|
||||||
|
// of execution on Firefox. This schedules the response in the run-loop,
|
||||||
|
// which appears to fix the issue.
|
||||||
|
var callback = function () {setTimeout(cb, 0);};
|
||||||
|
|
||||||
jQuery.getJSON('/pluginfw/plugin-definitions.json', function(data) {
|
jQuery.getJSON('/pluginfw/plugin-definitions.json', function(data) {
|
||||||
exports.plugins = data.plugins;
|
exports.plugins = data.plugins;
|
||||||
exports.parts = data.parts;
|
exports.parts = data.parts;
|
||||||
exports.hooks = exports.extractHooks(exports.parts, "client_hooks");
|
exports.hooks = exports.extractHooks(exports.parts, "client_hooks");
|
||||||
exports.loaded = true;
|
exports.loaded = true;
|
||||||
cb();
|
callback();
|
||||||
}).error(function(xhr, s, err){
|
}).error(function(xhr, s, err){
|
||||||
console.error("Failed to load plugin-definitions: " + err);
|
console.error("Failed to load plugin-definitions: " + err);
|
||||||
cb();
|
callback();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -276,21 +276,14 @@
|
||||||
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
||||||
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
||||||
<% if (settings.minify) { %>
|
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
|
||||||
<% } %>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.domain = document.domain;
|
document.domain = document.domain;
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
<% if (settings.minify) { %>
|
require.setRootURI("../javascripts/src");
|
||||||
require.setRootURI("../javascripts/src");
|
require.setLibraryURI("../javascripts/lib");
|
||||||
require.setLibraryURI("../javascripts/lib");
|
require.setGlobalKeyPath("require");
|
||||||
require.setGlobalKeyPath("require");
|
|
||||||
<% } else { %>
|
|
||||||
require.setRootURI("../static/js");
|
|
||||||
require.setLibraryURI("../static/plugins");
|
|
||||||
<% } %>
|
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
||||||
plugins.update(function () {
|
plugins.update(function () {
|
||||||
|
|
Loading…
Reference in New Issue