I've made a userscript to do this. It adds an arrow to the linked post depending on whether the question has been linked to or whether the current question has been linked from that post. There is also a tooltip to explain.
Example:
The UI could be improved on, so if you have any ideas, please comment!
I have added this feature into v1.0.3 (currently in dev
) of SOX: Stack Overflow Extras, a userscript which adds a bunch of optional features to the Stack Exchange sites. Install it for a bunch of other cool features as well as this! :)
Or... if you only want this, you can install it from GitHub Gist.
It works based on the idea that if the question in the sidebar had been linked to (from the current post), then there must be a hyperlink towards that question on the current page. Obviously, this is flawed on multi-page questions (loads of answers), but those are not very common, so it should work in most cases! :)
// ==UserScript==
// @name Mark linked posts as whether they are linked to or linked from
// @namespace http://stackexchange.com/users/4337810/
// @version 1.0
// @description A userscript that adds arrows on linked posts in the sidebar to show whether they are being linked to or from
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match *://*.stackoverflow.com/*
// @match *://*.stackexchange.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @grant none
// ==/UserScript==
setTimeout(function() {
$('.linked .spacer a.question-hyperlink').each(function() {
var id = $(this).attr('href').split('/')[4].split('?')[0];
if($('a[href*="' + id + '"]').not('.spacer a').length) {
$(this).append('<span title="Current question links to this question" style="color:black;font-size:15px;margin-left:5px;">↗</span>');
} else {
$(this).append('<span title="Current question is linked from this question" style="color:black;font-size:15px;margin-left:5px;">↙</span>');
}
});
}, 2000);