Highlight comment on initial page load with #hash in URL
parent
0f4a5cc2e3
commit
24683b08f9
|
@ -396,7 +396,7 @@ addListener(window, 'beforeunload', function(e)
|
||||||
(function()
|
(function()
|
||||||
{
|
{
|
||||||
var lastSel;
|
var lastSel;
|
||||||
addListener(window, 'hashchange', function()
|
var selectComment = function()
|
||||||
{
|
{
|
||||||
var a = document.getElementsByName(window.location.hash.substr(1));
|
var a = document.getElementsByName(window.location.hash.substr(1));
|
||||||
if (a.length)
|
if (a.length)
|
||||||
|
@ -416,7 +416,9 @@ addListener(window, 'beforeunload', function(e)
|
||||||
lastSel = a;
|
lastSel = a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
onDomReady(selectComment);
|
||||||
|
addListener(window, 'hashchange', selectComment);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
function showEditComment(comment_id)
|
function showEditComment(comment_id)
|
||||||
|
|
Loading…
Reference in New Issue