This commit is contained in:
Van 2019-06-23 14:14:37 +08:00
parent b57889bdac
commit 1c295785d0
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
7 changed files with 58 additions and 64 deletions

60
static/js/lib.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Dec 8, 2015 * @version 1.0.0.2, Jun 23, 2019
*/ */
var notification = { var notification = {
init: function () { init: function () {
@ -35,7 +35,7 @@ var notification = {
var notificationWS = new ReconnectingWebSocket(config.channel + '/notification/ws?sid=' + config.wideSessionId); var notificationWS = new ReconnectingWebSocket(config.channel + '/notification/ws?sid=' + config.wideSessionId);
notificationWS.onopen = function () { notificationWS.onopen = function () {
console.log('[notification onopen] connected'); // console.log('[notification onopen] connected');
}; };
notificationWS.onmessage = function (e) { notificationWS.onmessage = function (e) {
@ -44,7 +44,7 @@ var notification = {
notificationHTML = ''; notificationHTML = '';
if (data.cmd && "init-notification" === data.cmd) { if (data.cmd && "init-notification" === data.cmd) {
console.log('[notification onmessage]' + e.data); // console.log('[notification onmessage]' + e.data);
return; return;
} }
@ -58,11 +58,11 @@ var notification = {
}; };
notificationWS.onclose = function (e) { notificationWS.onclose = function (e) {
console.log('[notification onclose] disconnected (' + e.code + ')'); // console.log('[notification onclose] disconnected (' + e.code + ')');
}; };
notificationWS.onerror = function (e) { notificationWS.onerror = function (e) {
console.log('[notification onerror]'); console.log('[notification onerror]', e);
}; };
} }
}; };

View File

@ -19,7 +19,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.2, Oct 5, 2018 * @version 1.0.0.3, Jun 23, 2019
*/ */
var playground = { var playground = {
autocompleteMutex: false, autocompleteMutex: false,
@ -82,7 +82,6 @@ var playground = {
var autocompleteHints = []; var autocompleteHints = [];
if (playground.autocompleteMutex && editor.state.completionActive) { if (playground.autocompleteMutex && editor.state.completionActive) {
console.log(1);
return; return;
} }
@ -275,23 +274,23 @@ var playground = {
var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId); var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId);
sessionWS.onopen = function () { sessionWS.onopen = function () {
console.log('[session onopen] connected'); // console.log('[session onopen] connected');
}; };
sessionWS.onmessage = function (e) { sessionWS.onmessage = function (e) {
console.log('[session onmessage]' + e.data); // console.log('[session onmessage]' + e.data);
}; };
sessionWS.onclose = function (e) { sessionWS.onclose = function (e) {
console.log('[session onclose] disconnected (' + e.code + ')'); // console.log('[session onclose] disconnected (' + e.code + ')');
}; };
sessionWS.onerror = function (e) { sessionWS.onerror = function (e) {
console.log('[session onerror] ' + JSON.parse(e)); // console.log('[session onerror] ' + JSON.parse(e));
}; };
var playgroundWS = new ReconnectingWebSocket(config.channel + '/playground/ws?sid=' + config.wideSessionId); var playgroundWS = new ReconnectingWebSocket(config.channel + '/playground/ws?sid=' + config.wideSessionId);
playgroundWS.onopen = function () { playgroundWS.onopen = function () {
console.log('[playground onopen] connected'); // console.log('[playground onopen] connected');
}; };
playgroundWS.onmessage = function (e) { playgroundWS.onmessage = function (e) {
@ -318,10 +317,10 @@ var playground = {
$("#output").html(output); $("#output").html(output);
}; };
playgroundWS.onclose = function (e) { playgroundWS.onclose = function (e) {
console.log('[playground onclose] disconnected (' + e.code + ')'); // console.log('[playground onclose] disconnected (' + e.code + ')');
}; };
playgroundWS.onerror = function (e) { playgroundWS.onerror = function (e) {
console.log('[playground onerror] ' + JSON.parse(e)); console.log('[playground onerror] ', e);
}; };
}, },
_initGoNews: function () { _initGoNews: function () {
@ -374,7 +373,6 @@ var playground = {
playground.editor.setValue(data.code); playground.editor.setValue(data.code);
if (0 != result.code) { if (0 != result.code) {
console.log(data);
return; return;
} }
@ -460,8 +458,6 @@ var playground = {
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function (result) { success: function (result) {
console.log(result);
var data = result.data; var data = result.data;
$("#output").html(data.output); $("#output").html(data.output);

View File

@ -18,7 +18,7 @@
* @file session.js * @file session.js
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.1.0.1, Dec 8, 2015 * @version 1.1.0.2, Jun 23, 2019
*/ */
var session = { var session = {
init: function () { init: function () {
@ -158,8 +158,6 @@ var session = {
var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId); var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId);
sessionWS.onopen = function () { sessionWS.onopen = function () {
console.log('[session onopen] connected');
var dateFormat = function (time, fmt) { var dateFormat = function (time, fmt) {
var date = new Date(time); var date = new Date(time);
var dateObj = { var dateObj = {
@ -238,7 +236,7 @@ var session = {
} }
}; };
sessionWS.onclose = function (e) { sessionWS.onclose = function (e) {
console.log('[session onclose] disconnected (' + e.code + ')'); // console.log('[session onclose] disconnected (' + e.code + ')');
var data = {type: "Network", severity: "ERROR", var data = {type: "Network", severity: "ERROR",
message: "Disconnected from server, trying to reconnect it [sid=" + config.wideSessionId + "]"}, message: "Disconnected from server, trying to reconnect it [sid=" + config.wideSessionId + "]"},
@ -253,7 +251,7 @@ var session = {
$(".notification-count").show(); $(".notification-count").show();
}; };
sessionWS.onerror = function (e) { sessionWS.onerror = function (e) {
console.log('[session onerror]'); console.log('[session onerror]', e);
}; };
} }
}; };

View File

@ -19,7 +19,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Dec 8, 2015 * @version 1.0.0.2, Jun 23, 2019
*/ */
var wide = { var wide = {
curNode: undefined, curNode: undefined,
@ -343,11 +343,11 @@ var wide = {
_initWS: function () { _initWS: function () {
var outputWS = new ReconnectingWebSocket(config.channel + '/output/ws?sid=' + config.wideSessionId); var outputWS = new ReconnectingWebSocket(config.channel + '/output/ws?sid=' + config.wideSessionId);
outputWS.onopen = function () { outputWS.onopen = function () {
console.log('[output onopen] connected'); // console.log('[output onopen] connected');
}; };
outputWS.onmessage = function (e) { outputWS.onmessage = function (e) {
console.log('[output onmessage]' + e.data); // console.log('[output onmessage]' + e.data);
var data = JSON.parse(e.data); var data = JSON.parse(e.data);
if (goLintFound) { if (goLintFound) {
@ -463,10 +463,10 @@ var wide = {
} }
}; };
outputWS.onclose = function (e) { outputWS.onclose = function (e) {
console.log('[output onclose] disconnected (' + e.code + ')'); // console.log('[output onclose] disconnected (' + e.code + ')');
}; };
outputWS.onerror = function (e) { outputWS.onerror = function (e) {
console.log('[output onerror]'); console.log('[output onerror]',e);
}; };
}, },
_initFooter: function () { _initFooter: function () {

12
static/js/wide.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long