mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
fix(plugins): fix many bugs (in-app-menu, album-color-theme, blur-nav-bar)
This commit is contained in:
@ -1,11 +1,24 @@
|
||||
import { createPlugin } from '@/utils';
|
||||
import style from './style.css?inline';
|
||||
|
||||
import { t } from '@/i18n';
|
||||
|
||||
import style from './style.css?inline';
|
||||
|
||||
export default createPlugin({
|
||||
name: () => t('plugins.blur-nav-bar.name'),
|
||||
description: () => t('plugins.blur-nav-bar.description'),
|
||||
restartNeeded: true,
|
||||
stylesheets: [style],
|
||||
renderer() {},
|
||||
restartNeeded: false,
|
||||
renderer: {
|
||||
styleSheet: null as CSSStyleSheet | null,
|
||||
|
||||
async start() {
|
||||
this.styleSheet = new CSSStyleSheet();
|
||||
await this.styleSheet.replace(style);
|
||||
|
||||
document.adoptedStyleSheets = [...document.adoptedStyleSheets, this.styleSheet];
|
||||
},
|
||||
async stop() {
|
||||
await this.styleSheet?.replace('');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user