Verified Commit 73a02941 authored by Chocobozzz's avatar Chocobozzz
Browse files

Add route hook action

parent 1fd372ec
......@@ -46,6 +46,13 @@ function register ({ registerHook, peertubeHelpers }) {
handler: result => addSymbolToVideoNameResult(result, ':D')
})
// Router hooks
registerHook({
target: 'action:router.navigation-end',
handler: params => console.log('New URL! %s.', params.path)
})
// Fake hook
registerHook({
......
......@@ -15,9 +15,17 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
name: 'admin-name',
label: 'Admin name',
type: 'input',
private: true,
default: defaultAdmin
})
registerSetting({
name: 'user-name',
label: 'User name',
type: 'input',
private: false
})
const value = await storageManager.getData('toto')
console.log(value)
......
{
"name": "peertube-plugin-hello-world",
"version": "0.0.11",
"version": "0.0.12",
"description": "Hello world PeerTube plugin example",
"engine": {
"peertube": ">=1.3.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment