mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-13 07:17:12 +03:00
Minor cleanup (unnecessary functions, array prototype calls)
This commit is contained in:
parent
3ca345b26f
commit
2e3c709459
@ -87,7 +87,7 @@ var DISCORD = (function(){
|
||||
return null;
|
||||
}
|
||||
|
||||
var name = [].find.call(channel.querySelector("[class|='name']").childNodes, node => node.nodeType === Node.TEXT_NODE).nodeValue;
|
||||
var name = Array.prototype.find.call(channel.querySelector("[class|='name']").childNodes, node => node.nodeType === Node.TEXT_NODE).nodeValue;
|
||||
|
||||
obj = {
|
||||
"server": name,
|
||||
|
@ -13,16 +13,6 @@ var DOM = (function(){
|
||||
*/
|
||||
id: (id, parent) => (parent || document).getElementById(id),
|
||||
|
||||
/*
|
||||
* Returns the first child element containing the specified class. Parent defaults to the entire document.
|
||||
*/
|
||||
fcls: (cls, parent) => (parent || document).getElementsByClassName(cls)[0],
|
||||
|
||||
/*
|
||||
* Returns the first child element that has the specified tag. Parent defaults to the entire document.
|
||||
*/
|
||||
ftag: (tag, parent) => (parent || document).getElementsByTagName(tag)[0],
|
||||
|
||||
/*
|
||||
* Returns the first child element containing the specified obfuscated class. Parent defaults to the entire document.
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ ${btn("close", "X")}`);
|
||||
});
|
||||
|
||||
DOM.listen(controller.ui.inputUpload, "change", () => {
|
||||
[].forEach.call(controller.ui.inputUpload.files, file => {
|
||||
Array.prototype.forEach.call(controller.ui.inputUpload.files, file => {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user