mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 19:01:47 +00:00
25 lines
643 B
TypeScript
25 lines
643 B
TypeScript
import style from './style.css?inline';
|
|
import { createPlugin } from '@/utils';
|
|
import { ElementFromHtml } from '@/plugins/utils/renderer';
|
|
|
|
import forwardHTML from './templates/forward.html?raw';
|
|
import backHTML from './templates/back.html?raw';
|
|
|
|
export default createPlugin({
|
|
name: 'Navigation',
|
|
restartNeeded: true,
|
|
config: {
|
|
enabled: false,
|
|
},
|
|
stylesheets: [style],
|
|
renderer() {
|
|
const forwardButton = ElementFromHtml(forwardHTML);
|
|
const backButton = ElementFromHtml(backHTML);
|
|
const menu = document.querySelector('#right-content');
|
|
|
|
if (menu) {
|
|
menu.prepend(backButton, forwardButton);
|
|
}
|
|
},
|
|
});
|