From f4e6b00c7b11abdcb3456697c5a7881ebb10f8d0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 May 2020 15:50:37 +0200 Subject: [PATCH] Test login hook in hello world plugin --- .../client/login-client-plugin.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 peertube-plugin-hello-world/client/login-client-plugin.js diff --git a/peertube-plugin-hello-world/client/login-client-plugin.js b/peertube-plugin-hello-world/client/login-client-plugin.js new file mode 100644 index 0000000..42abe24 --- /dev/null +++ b/peertube-plugin-hello-world/client/login-client-plugin.js @@ -0,0 +1,14 @@ +function register ({ registerHook, peertubeHelpers }) { + + registerHook({ + target: 'action:login.init', + handler: () => { + console.log('Login init') + document.querySelector('.looking-for-account > div').innerHTML = 'Hello' + } + }) +} + +export { + register +}