add "noImplicitThis":true
This commit is contained in:
parent
ec2fc491d9
commit
ce3ea3a271
17 changed files with 58 additions and 59 deletions
|
@ -58,7 +58,7 @@ class Channel {
|
|||
this.deleteChannel();
|
||||
}, null, _ => { console.log(_); return _.isAdmin(); });
|
||||
this.contextmenu.addbutton("Edit channel", function () {
|
||||
this.editChannel(this);
|
||||
this.editChannel();
|
||||
}, null, _ => { return _.isAdmin(); });
|
||||
this.contextmenu.addbutton("Make invite", function () {
|
||||
this.createInvite();
|
||||
|
@ -346,9 +346,9 @@ class Channel {
|
|||
addchannel.textContent = "+";
|
||||
addchannel.classList.add("addchannel");
|
||||
caps.appendChild(addchannel);
|
||||
addchannel.onclick = function () {
|
||||
addchannel.onclick = _ => {
|
||||
this.guild.createchannels(this.createChannel.bind(this));
|
||||
}.bind(this);
|
||||
};
|
||||
this.coatDropDiv(decdiv, childrendiv);
|
||||
}
|
||||
div.appendChild(caps);
|
||||
|
@ -552,8 +552,7 @@ class Channel {
|
|||
});
|
||||
console.log(full);
|
||||
full.hide();
|
||||
}]
|
||||
]
|
||||
}]]
|
||||
]);
|
||||
full.show();
|
||||
console.log(full);
|
||||
|
|
|
@ -238,7 +238,7 @@ class Dialog {
|
|||
this.background.classList.add("background");
|
||||
document.body.appendChild(this.background);
|
||||
document.body.appendChild(this.html);
|
||||
this.background.onclick = function () { this.hide(); }.bind(this);
|
||||
this.background.onclick = _ => { this.hide(); };
|
||||
}
|
||||
hide() {
|
||||
document.body.removeChild(this.background);
|
||||
|
|
|
@ -446,8 +446,7 @@ class Guild {
|
|||
console.log(name, category);
|
||||
func(name, category);
|
||||
channelselect.hide();
|
||||
}.bind(this)]
|
||||
]);
|
||||
}.bind(this)]]);
|
||||
channelselect.show();
|
||||
}
|
||||
createcategory() {
|
||||
|
@ -458,12 +457,11 @@ class Guild {
|
|||
console.log(this);
|
||||
name = this.value;
|
||||
}],
|
||||
["button", "", "submit", function () {
|
||||
["button", "", "submit", () => {
|
||||
console.log(name, category);
|
||||
this.createChannel(name, category);
|
||||
channelselect.hide();
|
||||
}]
|
||||
]);
|
||||
}]]);
|
||||
channelselect.show();
|
||||
}
|
||||
delChannel(json) {
|
||||
|
|
|
@ -153,11 +153,13 @@ typebox.addEventListener("keydown", event => {
|
|||
});
|
||||
console.log(typebox);
|
||||
typebox.onclick = console.log;
|
||||
function getguildinfo() {
|
||||
const path = window.location.pathname.split("/");
|
||||
const channel = path[3];
|
||||
this.ws.send(JSON.stringify({ op: 14, d: { guild_id: path[2], channels: { [channel]: [[0, 99]] } } }));
|
||||
/*
|
||||
function getguildinfo(){
|
||||
const path=window.location.pathname.split("/");
|
||||
const channel=path[3];
|
||||
this.ws.send(JSON.stringify({op: 14, d: {guild_id: path[2], channels: {[channel]: [[0, 99]]}}}));
|
||||
}
|
||||
*/
|
||||
const images = [];
|
||||
const imageshtml = [];
|
||||
import { File } from "./file.js";
|
||||
|
|
|
@ -917,8 +917,7 @@ class Localuser {
|
|||
this.mfa_enabled = true;
|
||||
}
|
||||
});
|
||||
}]
|
||||
]);
|
||||
}]]);
|
||||
console.log("here :3");
|
||||
addmodel.show();
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ class Member {
|
|||
this.contextmenu.addbutton("Message user", function () {
|
||||
fetch(this.info.api + "/users/@me/channels", { method: "POST",
|
||||
body: JSON.stringify({ "recipients": [this.id] }),
|
||||
headers: this.headers
|
||||
headers: this.localuser.headers
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ class Message {
|
|||
Message.contextmenu.addbutton("Edit", function () {
|
||||
this.channel.editing = this;
|
||||
const markdown = (document.getElementById("typebox"))["markdown"];
|
||||
markdown.txt = this.content.rawString;
|
||||
markdown.txt = this.content.rawString.split('');
|
||||
markdown.boxupdate(document.getElementById("typebox"));
|
||||
}, null, _ => { return _.author.id === _.localuser.user.id; });
|
||||
Message.contextmenu.addbutton("Delete message", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue