mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 11:01:45 +00:00
@ -1,24 +0,0 @@
|
||||
const { triggerAction } = require('../utils');
|
||||
|
||||
const CHANNEL = 'navigation';
|
||||
const ACTIONS = {
|
||||
NEXT: 'next',
|
||||
BACK: 'back',
|
||||
};
|
||||
|
||||
function goToNextPage() {
|
||||
triggerAction(CHANNEL, ACTIONS.NEXT);
|
||||
}
|
||||
|
||||
function goToPreviousPage() {
|
||||
triggerAction(CHANNEL, ACTIONS.BACK);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
CHANNEL,
|
||||
ACTIONS,
|
||||
actions: {
|
||||
goToNextPage,
|
||||
goToPreviousPage,
|
||||
},
|
||||
};
|
||||
21
plugins/navigation/actions.ts
Normal file
21
plugins/navigation/actions.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { Actions, triggerAction } from '../utils';
|
||||
|
||||
export const CHANNEL = 'navigation';
|
||||
export const ACTIONS = Actions;
|
||||
|
||||
export function goToNextPage() {
|
||||
triggerAction(CHANNEL, Actions.NEXT);
|
||||
}
|
||||
|
||||
export function goToPreviousPage() {
|
||||
triggerAction(CHANNEL, Actions.BACK);
|
||||
}
|
||||
|
||||
export default {
|
||||
CHANNEL,
|
||||
ACTIONS,
|
||||
actions: {
|
||||
goToNextPage,
|
||||
goToPreviousPage,
|
||||
},
|
||||
};
|
||||
@ -1,6 +1,6 @@
|
||||
const path = require('node:path');
|
||||
|
||||
const { ACTIONS, CHANNEL } = require('./actions.js');
|
||||
const { ACTIONS, CHANNEL } = require('./actions.ts');
|
||||
|
||||
const { injectCSS, listenAction } = require('../utils');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user