Fossil SCM

/chat internal doc correction and cleanup. No visible changes.

stephan 2021-04-09 07:17 trunk
Commit 243be3ef04b3b9065b1c7f478714350d5904c8729d2fc18650888278281cb265
1 file changed +3 -4
+3 -4
--- src/chat.js
+++ src/chat.js
@@ -378,11 +378,11 @@
378378
},
379379
/**
380380
Sets the current new-message audio alert URI (must be a
381381
repository-relative path which responds with an audio
382382
file). Pass a falsy value to disable audio alerts. Returns
383
- this. This setting is persistent. Returns this.
383
+ this.
384384
*/
385385
setNewMessageSound: function f(uri){
386386
delete this.playNewMessageSound.audio;
387387
this.playNewMessageSound.uri = uri;
388388
this.settings.set('audible-alert', !!uri);
@@ -409,11 +409,10 @@
409409
document.body.classList.add('monospace-messages');
410410
}
411411
cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
412412
cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
413413
cs.pageTitleOrig = cs.e.pageTitle.innerText;
414
-
415414
const qs = (e)=>document.querySelector(e);
416415
const argsToArray = function(args){
417416
return Array.prototype.slice.call(args,0);
418417
};
419418
/**
@@ -433,18 +432,18 @@
433432
*/
434433
cs.reportErrorAsMessage = function(/*msg args*/){
435434
const args = argsToArray(arguments);
436435
console.error("chat error:",args);
437436
const d = new Date().toISOString(),
438
- msg = {
437
+ mw = new this.MessageWidget({
439438
isError: true,
440439
xfrom: null,
441440
msgid: -1,
442441
mtime: d,
443442
lmtime: d,
444443
xmsg: args
445
- }, mw = new this.MessageWidget(msg);
444
+ });
446445
this.injectMessageElem(mw.e.body);
447446
mw.scrollIntoView();
448447
};
449448
450449
cs.getMessageElemById = function(id){
451450
--- src/chat.js
+++ src/chat.js
@@ -378,11 +378,11 @@
378 },
379 /**
380 Sets the current new-message audio alert URI (must be a
381 repository-relative path which responds with an audio
382 file). Pass a falsy value to disable audio alerts. Returns
383 this. This setting is persistent. Returns this.
384 */
385 setNewMessageSound: function f(uri){
386 delete this.playNewMessageSound.audio;
387 this.playNewMessageSound.uri = uri;
388 this.settings.set('audible-alert', !!uri);
@@ -409,11 +409,10 @@
409 document.body.classList.add('monospace-messages');
410 }
411 cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
412 cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
413 cs.pageTitleOrig = cs.e.pageTitle.innerText;
414
415 const qs = (e)=>document.querySelector(e);
416 const argsToArray = function(args){
417 return Array.prototype.slice.call(args,0);
418 };
419 /**
@@ -433,18 +432,18 @@
433 */
434 cs.reportErrorAsMessage = function(/*msg args*/){
435 const args = argsToArray(arguments);
436 console.error("chat error:",args);
437 const d = new Date().toISOString(),
438 msg = {
439 isError: true,
440 xfrom: null,
441 msgid: -1,
442 mtime: d,
443 lmtime: d,
444 xmsg: args
445 }, mw = new this.MessageWidget(msg);
446 this.injectMessageElem(mw.e.body);
447 mw.scrollIntoView();
448 };
449
450 cs.getMessageElemById = function(id){
451
--- src/chat.js
+++ src/chat.js
@@ -378,11 +378,11 @@
378 },
379 /**
380 Sets the current new-message audio alert URI (must be a
381 repository-relative path which responds with an audio
382 file). Pass a falsy value to disable audio alerts. Returns
383 this.
384 */
385 setNewMessageSound: function f(uri){
386 delete this.playNewMessageSound.audio;
387 this.playNewMessageSound.uri = uri;
388 this.settings.set('audible-alert', !!uri);
@@ -409,11 +409,10 @@
409 document.body.classList.add('monospace-messages');
410 }
411 cs.inputMultilineMode(cs.settings.getBool('edit-multiline',false));
412 cs.chatOnlyMode(cs.settings.getBool('chat-only-mode'));
413 cs.pageTitleOrig = cs.e.pageTitle.innerText;
 
414 const qs = (e)=>document.querySelector(e);
415 const argsToArray = function(args){
416 return Array.prototype.slice.call(args,0);
417 };
418 /**
@@ -433,18 +432,18 @@
432 */
433 cs.reportErrorAsMessage = function(/*msg args*/){
434 const args = argsToArray(arguments);
435 console.error("chat error:",args);
436 const d = new Date().toISOString(),
437 mw = new this.MessageWidget({
438 isError: true,
439 xfrom: null,
440 msgid: -1,
441 mtime: d,
442 lmtime: d,
443 xmsg: args
444 });
445 this.injectMessageElem(mw.e.body);
446 mw.scrollIntoView();
447 };
448
449 cs.getMessageElemById = function(id){
450

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button