Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

A lot of refactoring, and etc #232

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open

Conversation

Rudxain
Copy link
Contributor

@Rudxain Rudxain commented May 27, 2022

Fixes #246
The title is self-descriptive. I also renamed misleading names of functions, and activated JS strict mode.

I made small style changes, like making 1-liner functions actually use 1 line, and splitting long lines of property access into multiple lines for easier reading

@Rudxain
Copy link
Contributor Author

Rudxain commented May 27, 2022

Wait, I forgot to check if any renamed function is used outside the file. I'll convert to draft

@Rudxain Rudxain marked this pull request as draft May 27, 2022 05:16
@Rudxain Rudxain marked this pull request as ready for review May 27, 2022 05:33
@Rudxain
Copy link
Contributor Author

Rudxain commented May 27, 2022

It seems no functionality should break after renaming, AFAIK

@Rudxain Rudxain changed the title Refactoring, formatting, etc... Refactored icon.js May 29, 2022
@Rudxain Rudxain changed the title Refactored icon.js Some refactoring May 29, 2022
@Rudxain
Copy link
Contributor Author

Rudxain commented Jun 12, 2022

I need to do more refactoring and solve the commit incompatibility. Converting to draft

@Rudxain Rudxain marked this pull request as draft June 12, 2022 19:41
@GDColon
Copy link
Owner

GDColon commented Jun 12, 2022

(whoops sorry)
new conflicts aside this looks good, i was just reluctant at first since theres things i do and dont like

@Rudxain
Copy link
Contributor Author

Rudxain commented Jun 13, 2022

It's okay. I realized I made a mistake in the formatting. For example, I found an else clause formatted like this:

if (...) {
    ...
}

else {
    ...
}

And I thought it was a whitespace typo because it looked weird and unique, but then I found it's actually a pattern found in many places lol

@GDColon
Copy link
Owner

GDColon commented Jun 14, 2022

It's okay. I realized I made a mistake in the formatting. For example, I found an else clause formatted like this:

if (...) {
    ...
}

else {
    ...
}

And I thought it was a whitespace typo because it looked weird and unique, but then I found it's actually a pattern found in many places lol

oh this is always how i've done it, pls dont change

@Rudxain
Copy link
Contributor Author

Rudxain commented Jun 14, 2022

lmao, I was using a VScode extension to edit repos remotely without cloning, and I thought I had to type the branch name everytime I wanted to commit. Sorry for any confusion to everyone. Now the commits are named using unhelpful names

app.use('/iconkit', express.static(__dirname + '/iconkit'));
app.get("/global.js", function(req, res) { res.status(200).sendFile(__dirname + "/misc/global.js") })
app.use('/iconkit', express.static(__dirname + '/iconkit'))
app.get("/misc/global.js", function(req, res) { res.status(200).sendFile(__dirname + "/misc/global.js") })

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited.
})

function sendHTML(dir, name) {
app.get("/" + dir, function(req, res) { res.status(200).sendFile(`${__dirname}/html/${name || dir}.html`) })

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited.
api/post/postComment.js Show resolved Hide resolved
api/post/postProfileComment.js Show resolved Hide resolved
html/level.html Show resolved Hide resolved
html/iconkit.html Show resolved Hide resolved
@Rudxain Rudxain marked this pull request as ready for review July 3, 2022 18:09
@Rudxain
Copy link
Contributor Author

Rudxain commented Jul 3, 2022

I think this PR is too big now. I'll re-review to see if I made more mistakes, and only fix those mistakes in this PR. Any further changes will be done in a separate PR

@@ -17,7 +17,6 @@
[ "Cool", 37, 20, 17, 1 ],
[ "Cyclic", 30, 3, 12, 0 ],
[ "DanZmeN", 104, 34, 12, 1 ],
[ "DanZmeN", 104, 34, 12, 1 ],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DanZmeN was duped lol

@Rudxain
Copy link
Contributor Author

Rudxain commented Jul 3, 2022

I'm reverting those URLs because I didn't test if they work

Replaced `var` by `let`, and splitted 1 line. At `sortObj`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typeof output gets coerced to bool
3 participants