2019-07-16 09:53:38 +00:00
|
|
|
function register ({ registerHook, peertubeHelpers }) {
|
|
|
|
registerHook({
|
2019-07-22 12:08:20 +00:00
|
|
|
target: 'action:application.init',
|
|
|
|
handler: () => onApplicationInit(peertubeHelpers)
|
2019-07-16 09:53:38 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
register
|
|
|
|
}
|
2019-07-16 14:00:11 +00:00
|
|
|
|
2019-07-22 12:08:20 +00:00
|
|
|
function onApplicationInit (peertubeHelpers) {
|
2019-07-16 14:00:11 +00:00
|
|
|
console.log('Hello application world')
|
|
|
|
|
|
|
|
const baseStaticUrl = peertubeHelpers.getBaseStaticRoute()
|
|
|
|
const imageUrl = baseStaticUrl + '/images/chocobo.png'
|
|
|
|
|
|
|
|
const topLeftBlock = document.querySelector('.top-left-block')
|
|
|
|
|
|
|
|
topLeftBlock.style.backgroundImage = 'url(' + imageUrl + ')'
|
|
|
|
}
|