Commit b79f215e authored by Aral Balkan's avatar Aral Balkan

Fixed the Private Conversations timelines (initial send).

parent fd1c487d
// Thanks to Karim (
function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
function insertAfter(parentNode, referenceNode, newNode) {
// Make sure we handle the null reference node gracefully
// (i.e., the parent node being inserted into has no children)
var nodeToInsertBefore = referenceNode;
if (referenceNode != null)
nodeToInsertBefore = referenceNode.nextSibling
parentNode.insertBefore(newNode, nodeToInsertBefore);
window.addEventListener('load', function(){
......@@ -120,7 +129,7 @@ window.addEventListener('load', function(){
div.innerHTML = repeaterNodeHTML;
// Insert new items at the end.
insertAfter(messages.lastElementChild, div);
insertAfter(messages, messages.lastElementChild, div);
// messages.innerHTML = repeaterNodeHTML + messages.innerHTML;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment