mirror of
https://notabug.org/SuperSaltyGamer/ame
synced 2026-01-15 17:42:55 -03:00
Resolve TypeScript problems
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { readFile } from 'fs/promises';
|
||||
import { basename, dirname, join } from 'path';
|
||||
import { basename, dirname } from 'path';
|
||||
import { LibraryFormats, Plugin, ResolvedConfig } from 'vite';
|
||||
|
||||
export interface UserScriptOptions {
|
||||
@@ -15,7 +15,7 @@ export function _userscript(options: UserScriptOptions): Plugin {
|
||||
|
||||
return {
|
||||
name: 'userscript',
|
||||
config(config, env) {
|
||||
config() {
|
||||
const name = options.name ?? basename(dirname(options.entry));
|
||||
|
||||
return {
|
||||
|
||||
@@ -75,7 +75,7 @@ export function createMenuItem(text: string, icon?: Icon): MenuItemElement {
|
||||
}
|
||||
|
||||
export function showMenuItem(menuEl: MenuElement, itemEl: MenuItemElement, priority: number = Number.MAX_VALUE) {
|
||||
itemEl.addEventListener('click', (e) => {
|
||||
itemEl.addEventListener('click', () => {
|
||||
const scrimButtonEl = menuEl.previousElementSibling?.shadowRoot?.lastElementChild as HTMLButtonElement | null;
|
||||
scrimButtonEl?.click();
|
||||
}, { once: true });
|
||||
|
||||
@@ -2,7 +2,7 @@ import { fetchCors, fromHTML, sleep } from '../../common';
|
||||
import { offAlbumRoute, onAlbumRoute } from '../glue/routing';
|
||||
import { createButtonElement } from '../glue/ui/sidebar';
|
||||
import { hqIcon } from '../icons';
|
||||
import { getAlbum } from '../services/album';
|
||||
import { getAlbum } from '../services';
|
||||
|
||||
interface Quality {
|
||||
'AUDIO-FORMAT-ID': string;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
@media (min-width: 484px) {
|
||||
|
||||
/*noinspection ALL*/
|
||||
.header {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user