get rid of excessive logging

This commit is contained in:
MathMan05 2025-04-05 21:12:09 -05:00
parent fbd7c38f44
commit b667ff7a78
3 changed files with 2 additions and 13 deletions

View file

@ -2260,7 +2260,6 @@ class Localuser {
md,
null,
);
//*/
}
MDReplace(
replacewith: string,
@ -2276,14 +2275,10 @@ class Localuser {
raw = "";
}
raw = (start ? original.replace(start, "") : original) + replacewith + raw;
console.log(raw);
console.log(replacewith);
console.log(original);
typebox.txt = raw.split("");
console.log(typebox.rawString);
const match = start ? original.match(start) : true;
if (match) {
console.log(match);
typebox.boxupdate(
replacewith.length - (match === true ? 0 : match[0].length),
false,
@ -2319,8 +2314,6 @@ class Localuser {
const box = typebox.box.deref();
if (!box) return;
if (selection) {
console.warn(original);
const pos = getTextNodeAtPosition(
box,
original.length -

View file

@ -733,7 +733,6 @@ class MarkDown {
};
box.onpaste = (_) => {
if (!_.clipboardData) return;
console.log(_.clipboardData.types);
const data = _.clipboardData.getData("text");
document.execCommand("insertHTML", false, data);
@ -912,7 +911,6 @@ function saveCaretPosition(
}
i++;
}
console.log(base);
const prev = base.previousSibling;
let len = 0;
if ((!prev || prev instanceof HTMLBRElement) && base instanceof HTMLBRElement) {
@ -984,9 +982,7 @@ function saveCaretPosition(
len = computedLength;
}
len = Math.min(len, txtLengthFunc(context).length);
console.log(len, base);
len += offset;
console.log(len);
return function restore() {
if (!selection) return;
const pos = getTextNodeAtPosition(context, len, txtLengthFunc);

View file

@ -46,7 +46,7 @@ class Message extends SnowFlake {
get div(){
return this.weakdiv?.deref();
}
//*/
*/
div: HTMLDivElement | undefined;
member: Member | undefined;
reactions!: messagejson["reactions"];