// typescript DOM manipulation: https://www.typescriptlang.org/docs/handbook/dom-manipulation.html
const target_container = document.getElementById('share')
const page_links = document.querySelectorAll(
// filtering elements in NodeList: https://stackoverflow.com/a/6791385
const list_fragment = document.createDocumentFragment()
for (let i = 0; i < page_links.length; i++) {
const list_item = document.createElement('li')
list_item.appendChild(page_links[i])
list_fragment.appendChild(list_item)
const container = document.createElement('ul')
container.appendChild(list_fragment)
target_container?.appendChild(container)