diff --git a/actions.js b/actions.js index 26b3da98a2123c6197eefa4db08480f456360feb..48e5daaeb3eff5a326de8f34a24153e020d8d65f 100644 --- a/actions.js +++ b/actions.js @@ -21,5 +21,42 @@ module.exports = function (self) { }); }, }, + page_action: { + name: 'Set Page', + options: [ + { + id: 'page', + type: 'number', + label: 'Page Number', + default: '', + }, + ], + callback: async (event) => { + self.sendToWebSocket('page-action', { + 'page': event.options.page - 1 + }); + }, + }, + navigate_action: { + name: 'Navigate', + options: [ + { + id: 'type', + type: 'dropdown', + choices: [ + { id: 'PREVIOUS', label: 'Previous' }, + { id: 'NEXT', label: 'Next' } + ], + label: 'Action', + default: '', + }, + ], + callback: async (event) => { + self.sendToWebSocket('navigate-action', { + 'action': event.options.type + }); + }, + } + }) }