| ︙ | | |
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
+
+
+
+
|
let dbg = document.querySelector('#debugMsg');
if(dbg){
/* This can inadvertently influence our flexbox layouts, so move
it out of the way. */
D.append(document.body,dbg);
}
})();
/* Returns a list of DOM elements which "frame" the chat UI. These
elements are considered to _not_ be part of the chat UI and that
info is used for sizing the chat UI. In chat-only mode, these are
the elements that get hidden. */
const GetFramingElements = function() {
return document.querySelectorAll([
"body > header",
"body > nav.mainmenu",
"body > footer",
"#debugMsg"
].join(','));
|
| ︙ | | |
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
|
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
|
-
+
|
/**
Toggles the given message between its parsed and plain-text
representations. It requires a server round-trip to collect the
plain-text form but caches it for subsequent toggles.
Expects the ID of a currently-loaded message or a
message-widget DOM elment from which it can extract an id.
This is an aync operation the first time it's passed a given
This is an async operation the first time it's passed a given
message and synchronous on subsequent calls for that
message. It is a no-op if id does not resolve to a loaded
message.
*/
cs.toggleTextMode = function(id){
var e;
if(id instanceof HTMLElement){
|
| ︙ | | |
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
|
-
+
|
aftersend:function(){
delete e.$isToggling;
Chat.ajaxEnd();
}
});
return true;
};
/** Given a .message-row element, this function returns whethe the
current user may, at least hypothetically, delete the message
globally. A user may always delete a local copy of a
post. The server may trump this, e.g. if the login has been
cancelled after this page was loaded.
*/
cs.userMayDelete = function(eMsg){
|
| ︙ | | |
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
|
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
|
+
-
-
+
+
|
optAu.theLegend.addEventListener('click',function(){
D.toggleClass(Chat.e.activeUserListWrapper, 'collapsed');
if(!Chat.e.activeUserListWrapper.classList.contains('collapsed')){
Chat.animate(optAu.theList,'anim-flip-v');
}
}, false);
}/*namedOptions.activeUsers additional setup*/
/* Settings menu entries... they are presented in the order listed
/* Settings menu entries... the most frequently-needed ones "should"
(arguably) be closer to the start of this list. */
here, so the most frequently-needed ones "should" (arguably) be
closer to the start of this list. */
/**
Settings ops structure:
label: string for the UI
boolValue: string (name of Chat.settings setting) or a function
which returns true or false. If it is a string, it gets
|
| ︙ | | |