1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

highlightReply: check for linking to external post

Fix for linking to external posts not working in Chrome.
This commit is contained in:
Mark Taiwan 2015-01-25 23:48:26 +08:00
parent 6b7df139e6
commit 61bd5c648e

View File

@ -254,6 +254,17 @@ function get_cookie(cookie_name) {
}
function highlightReply(id, event) {
if (typeof $ != 'undefined') {
// check if external post
// TODO: Don't use jQuery
var post_list = $('a.post_no').filter(':not([id])').filter(function(){
if (!$(this).parent().parent().hasClass('hidden')) return true;
});
post_list = $.map($.makeArray(post_list), function(ele) {return $(ele).html()});
if (post_list.indexOf(id) == -1)
return true;
}
if (typeof window.event != "undefined") {
// don't highlight on middle click
var e = event || window.event;