Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -158,14 +158,14 @@ define([
|
||||
var done = function () {
|
||||
clearTimeout(timeout);
|
||||
if (btime) {
|
||||
console.log("Compiling [" + url + "] took " + (+new Date() - btime) + "ms");
|
||||
console.info("Compiling [" + url + "] took " + (+new Date() - btime) + "ms");
|
||||
}
|
||||
cb();
|
||||
};
|
||||
stack.push(url);
|
||||
cacheGet(url, function (css) {
|
||||
if (css) { return void loadSubmodulesAndInject(css, url, done, stack); }
|
||||
console.log('CACHE MISS ' + url);
|
||||
console.debug('CACHE MISS ' + url);
|
||||
((/\.less([\?\#].*)?$/.test(url)) ? loadLess : loadCSS)(url, function (err, css) {
|
||||
if (!css) { return void console.error(err); }
|
||||
var output = fixAllURLs(css, url);
|
||||
|
||||
@@ -728,6 +728,15 @@ define([
|
||||
network.on('reconnect', function () {
|
||||
if (channel && channel.stopped) { return; }
|
||||
if (!channels[data.channel]) { return; }
|
||||
|
||||
if (!joining[data.channel]) {
|
||||
joining[data.channel] = function () {
|
||||
console.log("reconnected to %s", data.channel);
|
||||
};
|
||||
} else {
|
||||
console.error("Reconnected to a chat channel (%s) which was not fully connected", data.channel);
|
||||
}
|
||||
|
||||
network.join(data.channel).then(onOpen, function (err) {
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -222,13 +222,14 @@
|
||||
return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
|
||||
};
|
||||
|
||||
Util.noop = function () {};
|
||||
|
||||
/* for wrapping async functions such that they can only be called once */
|
||||
Util.once = function (f) {
|
||||
var called;
|
||||
Util.once = function (f, g) {
|
||||
return function () {
|
||||
if (called) { return; }
|
||||
called = true;
|
||||
if (!f) { return; }
|
||||
f.apply(this, Array.prototype.slice.call(arguments));
|
||||
f = g;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1346,7 +1346,7 @@ define([
|
||||
console.log(parsed);
|
||||
return;
|
||||
} else {
|
||||
console.log(parsed);
|
||||
//console.log(parsed);
|
||||
}
|
||||
Util.fetch(parsed.href, waitFor(function (err, arraybuffer) {
|
||||
if (err) { return void console.log(err); }
|
||||
|
||||
@@ -6,7 +6,7 @@ define(['/api/config'], function (ApiConfig) {
|
||||
|
||||
|
||||
var isSupported = Module.isSupported = function () {
|
||||
return typeof(window.Notification) === 'function';
|
||||
return typeof(window.Notification) === 'function' && window.location.protocol === 'https:';
|
||||
};
|
||||
|
||||
var hasPermission = Module.hasPermission = function () {
|
||||
@@ -52,7 +52,7 @@ define(['/api/config'], function (ApiConfig) {
|
||||
};
|
||||
|
||||
var createFavicon = function () {
|
||||
console.log("creating favicon");
|
||||
console.debug("creating favicon");
|
||||
var fav = document.createElement('link');
|
||||
var attrs = {
|
||||
id: 'favicon',
|
||||
|
||||
@@ -126,7 +126,7 @@ define([
|
||||
|
||||
var onMessage = function (data, cb) {
|
||||
// data = { type: 'type', content: {msg: 'msg', hash: 'hash'} }
|
||||
console.log(data.type, data.content);
|
||||
console.debug(data.type, data.content);
|
||||
pushMessage(data);
|
||||
if (data.content && typeof (data.content.getFormatText) == "function") {
|
||||
var text = $('<div>').html(data.content.getFormatText()).text();
|
||||
|
||||
Reference in New Issue
Block a user