Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Carbrex committed Jul 6, 2024
1 parent 70c82d3 commit 2caefd0
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion ui/analyse/src/plugins/analyse.study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const start = makeStart(patch, studyDeps);
export const boot = makeBoot(start);

export function initModule(cfg: any) {
// console.log('initModule', cfg);
site.socket = new site.StrongSocket(cfg.socketUrl || '/analysis/socket/v5', cfg.socketVersion, {
receive: (t: string, d: any) => analyse.socketReceive(t, d),
});
Expand Down
3 changes: 0 additions & 3 deletions ui/analyse/src/study/relay/relayView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ export function relayView(
relay: RelayCtrl,
deps: typeof studyDeps,
): VNode {
// console.log(ctrl);
// console.log(site.analysis)
const ctx: RelayViewContext = { ...viewContext(ctrl, deps), study, deps, relay, allowVideo: allowVideo() };

const renderTourView = () => [renderRelayTour(ctx), tourSide(ctx), deps.relayManager(relay, study)];
// console.log(renderTourView());
return renderMain(ctx, [
ctrl.keyboardHelp && keyboardView(ctrl),
deps.studyView.overboard(study),
Expand Down
5 changes: 1 addition & 4 deletions ui/analyse/src/view/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export function renderMain(
{ ctrl, playerBars, gaugeOn, gamebookPlayView, needsInnerCoords, hasRelayTour }: ViewContext,
kids: VNodeKids,
): VNode {
// console.log('renderMainmake');
return h(
'main.analyse.variant-' + ctrl.data.game.variant.key,
{
Expand Down Expand Up @@ -405,8 +404,7 @@ function broadcastChatHandler(ctrl: AnalyseCtrl):BroadcastChatHandler {
if (msg.includes('\ue666') && ctrl.study?.relay) {
let segs = msg.split('\ue666');
if (segs.length == 3) {
const [text, chapterId, ply] = segs;
// console.log(text, chapterId, ply);
const [_, chapterId, ply] = segs;
ctrl.study.setChapter(chapterId);
ctrl.jumpToMain(parseInt(ply));
}
Expand All @@ -430,7 +428,6 @@ function broadcastChatHandler(ctrl: AnalyseCtrl):BroadcastChatHandler {
}

export function makeChat(ctrl: AnalyseCtrl, insert: (chat: HTMLElement) => void) {
// console.log('makeChat');
if (ctrl.opts.chat) {
const chatEl = document.createElement('section');
chatEl.classList.add('mchat');
Expand Down
1 change: 0 additions & 1 deletion ui/chat/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export type { ChatPlugin } from './interfaces';
export { default as ChatCtrl } from './ctrl';

export function initModule(opts: ChatOpts): { preset: PresetCtrl } {
// console.log('hi chat.ts',opts);
const patch = init([classModule, attributesModule]);

const ctrl = new ChatCtrl(opts, redraw);
Expand Down
3 changes: 0 additions & 3 deletions ui/chat/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default class ChatCtrl {
readonly opts: ChatOpts,
readonly redraw: Redraw,
) {
// console.log(opts);
this.data = opts.data;
this.broadcastChatHandler = opts.broadcastChatHandler;
if (opts.noteId) this.allTabs.push('note');
Expand Down Expand Up @@ -100,7 +99,6 @@ export default class ChatCtrl {

post = (text: string): boolean => {
text = text.trim();
// console.log(text);
if (!text) return false;
if (text == 'You too!' && !this.data.lines.some(l => l.u != this.data.userId)) return false;
if (text.length > 125) {
Expand All @@ -110,7 +108,6 @@ export default class ChatCtrl {
if (text.includes('\ue666')) return false;

if (this.broadcastChatHandler) text = this.broadcastChatHandler.encode(text);
// console.log(text);

site.pubsub.emit('socket.send', 'talk', text);
return true;
Expand Down

0 comments on commit 2caefd0

Please sign in to comment.