diff --git a/src/core/api.js b/src/core/api.js index 8ff0b5c1..440c25c2 100644 --- a/src/core/api.js +++ b/src/core/api.js @@ -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') @@ -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') diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 423acdf3..ef5b448c 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -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) => { diff --git a/src/localization/manager.js b/src/localization/manager.js index c22f9500..2344241b 100644 --- a/src/localization/manager.js +++ b/src/localization/manager.js @@ -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]) diff --git a/src/modules/processing/services/tumblr.js b/src/modules/processing/services/tumblr.js index 05c7fd84..b2866c8f 100644 --- a/src/modules/processing/services/tumblr.js +++ b/src/modules/processing/services/tumblr.js @@ -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'; diff --git a/src/modules/sub/crypto.js b/src/modules/sub/crypto.js index b3a0539b..35b55b38 100644 --- a/src/modules/sub/crypto.js +++ b/src/modules/sub/crypto.js @@ -1,4 +1,4 @@ -import { createHmac, createCipheriv, createDecipheriv, scryptSync } from "crypto"; +import { createHmac, createCipheriv, createDecipheriv } from "crypto"; const algorithm = "aes256"