This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPost(node) { | |
while (node.className != 'alt2' && node.className != 'alt1') node = node.parentElement; | |
return node; | |
} | |
function getCite(noauthor) { | |
let sel = window.getSelection() | |
let post = getPost(sel.anchorNode).children[0] | |
let name = ((post.children.length == 0) ? post : post.children[1]).innerText | |
let content = sel.getRangeAt(0).cloneContents() |