Handle element placeholder

This commit is contained in:
Chocobozzz 2021-04-12 11:10:40 +02:00
parent 6c5d6aec36
commit 810d5517e2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
.header-right { .header-right {
background-color: black; background-color: black;
} }
.hello-world-h4 {
width: 150px;
color: white;
}

View File

@ -54,6 +54,15 @@ function register ({ registerHook, peertubeHelpers }) {
}) })
peertubeHelpers.notifier.info('you are on the watch page', 'useless', 1000) peertubeHelpers.notifier.info('you are on the watch page', 'useless', 1000)
// Insert element next to the player
{
const elem = document.createElement('div')
elem.className = 'hello-world-h4'
elem.innerHTML = '<h4>Hello everybody! This is an element next to the player</h4>'
document.getElementById('plugin-placeholder-player-next').appendChild(elem)
}
} }
export { export {

View File

@ -3,7 +3,7 @@
"version": "0.0.18", "version": "0.0.18",
"description": "Hello world PeerTube plugin example", "description": "Hello world PeerTube plugin example",
"engine": { "engine": {
"peertube": ">=2.2.0" "peertube": ">=3.2.0"
}, },
"keywords": [ "keywords": [
"peertube", "peertube",