8

The "Linked" section in the sidebar of a question seems to show

  • things linked by posts on this page and

  • things that link here

For those of us interested in this section, and those who like to click links and read lots of things, it's sometimes annoying to visually grep and not find one of the "Linked" links on this page.

To prevent cluttering the sidebar further, perhaps Links That Link Here can get some sort of icon or colorisation as to be distinguished from Links On This Page.

2

I've made a userscript to do this. It adds an arrow to the linked post depending on whether it 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:

enter image description here

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;">&nearr;</span>');
        } else {
            $(this).append('<span title="Current question is linked from this question" style="color:black;font-size:15px;margin-left:5px;">&swarr;</span>');
        }
    });
}, 2000);
| improve this answer | |
  • 1
    This is so nice. I already use SOX, lemme go get that version! :D – cat Mar 29 '16 at 22:42
  • 1
    @tac great! BTW I also added that reviewer stats script to SOX as well, so you don't need it separately anymore :) – ᔕᖺᘎᕊ Mar 30 '16 at 8:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .