Skip to content

Commit

Permalink
chore: remove unused imports/variables
Browse files Browse the repository at this point in the history
  • Loading branch information
wukko committed May 14, 2024
1 parent 7db84a1 commit 3e5ccea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
standardHeaders: true,
legacyHeaders: false,
keyGenerator: req => generateHmac(getIP(req), ipSalt),
handler: (req, res, next, opt) => {
handler: (req, res) => {
return res.status(429).json({
"status": "rate-limit",
"text": loc(languageCode(req), 'ErrorRateLimit')
Expand All @@ -38,7 +38,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
standardHeaders: true,
legacyHeaders: false,
keyGenerator: req => generateHmac(getIP(req), ipSalt),
handler: (req, res, next, opt) => {
handler: (req, res) => {
return res.status(429).json({
"status": "rate-limit",
"text": loc(languageCode(req), 'ErrorRateLimit')
Expand Down
2 changes: 1 addition & 1 deletion src/front/cobalt.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ window.onload = () => {
}
}

eid("url-input-area").addEventListener("keydown", (e) => {
eid("url-input-area").addEventListener("keydown", () => {
button();
})
eid("url-input-area").addEventListener("keyup", (e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/localization/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let loc = {}
let languages = [];

export async function loadLoc() {
const files = await fs.promises.readdir(locPath).catch((e) => { return [] });
const files = await fs.promises.readdir(locPath).catch(() => []);
files.forEach(file => {
loc[file.split('.')[0]] = loadJSON(`${locPath}/${file}`);
languages.push(file.split('.')[0])
Expand Down
1 change: 0 additions & 1 deletion src/modules/processing/services/tumblr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import psl from "psl";
import { genericUserAgent } from "../../config.js";

const API_KEY = 'jrsCWX1XDuVxAFO4GkK147syAoN8BJZ5voz8tS80bPcj26Vc5Z';
const API_BASE = 'https://api-http2.tumblr.com';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/sub/crypto.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createHmac, createCipheriv, createDecipheriv, scryptSync } from "crypto";
import { createHmac, createCipheriv, createDecipheriv } from "crypto";

const algorithm = "aes256"

Expand Down

0 comments on commit 3e5ccea

Please sign in to comment.