Highlight comment on initial page load with #hash in URL

3col
Vitaliy Filippov 2015-01-23 16:41:38 +03:00
parent 0f4a5cc2e3
commit 24683b08f9
1 changed files with 4 additions and 2 deletions

View File

@ -396,7 +396,7 @@ addListener(window, 'beforeunload', function(e)
(function()
{
var lastSel;
addListener(window, 'hashchange', function()
var selectComment = function()
{
var a = document.getElementsByName(window.location.hash.substr(1));
if (a.length)
@ -416,7 +416,9 @@ addListener(window, 'beforeunload', function(e)
lastSel = a;
}
}
});
};
onDomReady(selectComment);
addListener(window, 'hashchange', selectComment);
})();
function showEditComment(comment_id)