You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
364 B
16 lines
364 B
let permalink
|
|
|
|
register_hook('state-update', function (state, hash) {
|
|
permalink.href = hash
|
|
})
|
|
|
|
register_hook('init', function () {
|
|
let li = document.createElement('li')
|
|
|
|
permalink = document.createElement('a')
|
|
li.appendChild(permalink)
|
|
permalink.innerHTML = lang('main:permalink')
|
|
|
|
let menu = document.getElementById('menu')
|
|
menu.appendChild(li)
|
|
})
|