get rid of excessive logging
This commit is contained in:
parent
fbd7c38f44
commit
b667ff7a78
3 changed files with 2 additions and 13 deletions
|
@ -2260,7 +2260,6 @@ class Localuser {
|
||||||
md,
|
md,
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
//*/
|
|
||||||
}
|
}
|
||||||
MDReplace(
|
MDReplace(
|
||||||
replacewith: string,
|
replacewith: string,
|
||||||
|
@ -2276,14 +2275,10 @@ class Localuser {
|
||||||
raw = "";
|
raw = "";
|
||||||
}
|
}
|
||||||
raw = (start ? original.replace(start, "") : original) + replacewith + raw;
|
raw = (start ? original.replace(start, "") : original) + replacewith + raw;
|
||||||
console.log(raw);
|
|
||||||
console.log(replacewith);
|
|
||||||
console.log(original);
|
|
||||||
typebox.txt = raw.split("");
|
typebox.txt = raw.split("");
|
||||||
console.log(typebox.rawString);
|
|
||||||
const match = start ? original.match(start) : true;
|
const match = start ? original.match(start) : true;
|
||||||
if (match) {
|
if (match) {
|
||||||
console.log(match);
|
|
||||||
typebox.boxupdate(
|
typebox.boxupdate(
|
||||||
replacewith.length - (match === true ? 0 : match[0].length),
|
replacewith.length - (match === true ? 0 : match[0].length),
|
||||||
false,
|
false,
|
||||||
|
@ -2319,8 +2314,6 @@ class Localuser {
|
||||||
const box = typebox.box.deref();
|
const box = typebox.box.deref();
|
||||||
if (!box) return;
|
if (!box) return;
|
||||||
if (selection) {
|
if (selection) {
|
||||||
console.warn(original);
|
|
||||||
|
|
||||||
const pos = getTextNodeAtPosition(
|
const pos = getTextNodeAtPosition(
|
||||||
box,
|
box,
|
||||||
original.length -
|
original.length -
|
||||||
|
|
|
@ -733,7 +733,6 @@ class MarkDown {
|
||||||
};
|
};
|
||||||
box.onpaste = (_) => {
|
box.onpaste = (_) => {
|
||||||
if (!_.clipboardData) return;
|
if (!_.clipboardData) return;
|
||||||
console.log(_.clipboardData.types);
|
|
||||||
const data = _.clipboardData.getData("text");
|
const data = _.clipboardData.getData("text");
|
||||||
|
|
||||||
document.execCommand("insertHTML", false, data);
|
document.execCommand("insertHTML", false, data);
|
||||||
|
@ -912,7 +911,6 @@ function saveCaretPosition(
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
console.log(base);
|
|
||||||
const prev = base.previousSibling;
|
const prev = base.previousSibling;
|
||||||
let len = 0;
|
let len = 0;
|
||||||
if ((!prev || prev instanceof HTMLBRElement) && base instanceof HTMLBRElement) {
|
if ((!prev || prev instanceof HTMLBRElement) && base instanceof HTMLBRElement) {
|
||||||
|
@ -984,9 +982,7 @@ function saveCaretPosition(
|
||||||
len = computedLength;
|
len = computedLength;
|
||||||
}
|
}
|
||||||
len = Math.min(len, txtLengthFunc(context).length);
|
len = Math.min(len, txtLengthFunc(context).length);
|
||||||
console.log(len, base);
|
|
||||||
len += offset;
|
len += offset;
|
||||||
console.log(len);
|
|
||||||
return function restore() {
|
return function restore() {
|
||||||
if (!selection) return;
|
if (!selection) return;
|
||||||
const pos = getTextNodeAtPosition(context, len, txtLengthFunc);
|
const pos = getTextNodeAtPosition(context, len, txtLengthFunc);
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Message extends SnowFlake {
|
||||||
get div(){
|
get div(){
|
||||||
return this.weakdiv?.deref();
|
return this.weakdiv?.deref();
|
||||||
}
|
}
|
||||||
//*/
|
*/
|
||||||
div: HTMLDivElement | undefined;
|
div: HTMLDivElement | undefined;
|
||||||
member: Member | undefined;
|
member: Member | undefined;
|
||||||
reactions!: messagejson["reactions"];
|
reactions!: messagejson["reactions"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue