this doesn't seem to work
extend(Application.prototype, 'mount', function () {
const ContextMenu = {
view: () =>
m('ul', { className: 'menu', id: 'ctxmenu' }, [
m(
'li',
{ className: 'menu-item' },
m(
'button',
{ className: 'menu-btn', type: 'button' },
m('a', { href: app.forum.attribute('Link1url') }, [m('i', { className: 'fa fa-file' }),
m('span', { className: 'menu-text' }, link1)])
)
),
m('li', { className: 'menu-separator' }),
m(
'li',
{ className: 'menu-item' },
m(
'a',
{ href: 'https://www.facebook.com/flarumitaliaofficial' },
m('button', { className: 'menu-btn', type: 'button' }, [
m('i', { className: 'fab fa-facebook-f' }),
m('span', { className: 'menu-text' }, 'Facebook'),
])
)
),
m(
'li',
{ className: 'menu-item' },
m(
'a',
{ href: 'https://twitter.com/flarumitalia' },
m('button', { className: 'menu-btn', type: 'button' }, [
m('i', { className: 'fab fa-twitter' }),
m('span', { className: 'menu-text' }, 'Twitter'),
])
)
),
m(
'li',
{ className: 'menu-item' },
m(
'a',
{ href: 'https://github.com/justoverclockl' },
m('button', { className: 'menu-btn', type: 'button' }, [
m('i', { className: 'fab fa-github-alt' }),
m('span', { className: 'menu-text' }, 'Github'),
])
)
),
m('li', { className: 'menu-separator' }),
m(
'li',
{ className: 'menu-item' },
m(
'button',
{ className: 'menu-btn', type: 'button' },
m('a', { href: app.forum.attribute('Link2url') }, [m('i', { className: 'fa fa-envelope' }),
m('span', { className: 'menu-text' }, link2)])
)
),
])
};
m.mount(document.getElementById('ctxmenu'), ContextMenu);