chore: remove unused imports/variables

This commit is contained in:
wukko 2024-05-14 13:08:36 +06:00
parent 7db84a15e2
commit 3e5ccea23c
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
5 changed files with 5 additions and 6 deletions

View file

@ -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')

View file

@ -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) => {

View file

@ -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])

View file

@ -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';

View file

@ -1,4 +1,4 @@
import { createHmac, createCipheriv, createDecipheriv, scryptSync } from "crypto";
import { createHmac, createCipheriv, createDecipheriv } from "crypto";
const algorithm = "aes256"