News for hackers. Stuff that matters.
Re:Show HN: A chrome extension that fades out old links on H... by Jaruzel on Thursday August 16, 2018 @03:54AM (#17772751)
I know this fades them out, whether you've clicked on them or not, but it makes me think about how so many sites no longer use a:visited properly, and just style it the same colour as un-visited links. Each day, web usability takes a step backwards. How many extra extensions do we have to start installing before it becomes usable again?! Sometimes I really miss HTML 2.0.
Re:Show HN: A chrome extension that fades out old links on H... by Nic0 on Thursday August 16, 2018 @05:56AM (#17773293)
I added a script on greasemonkey for HN visited linked with : I dont remember where did I get that code, but it work for me.

    // ==UserScript==
    // @name     HN visited link
    // @version  1
    // @grant    all
    // ==/UserScript==
    
    let aCss = `
        .news-list a:visited {
    			color: lightgray;
        }
    `
    
    addGlobalStyle(aCss);
    function addGlobalStyle(css) {
        var head, style;
        head = document.getElementsByTagName('head')[0];
        if (!head) { return; }
        style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = css;
        head.appendChild(style);
    }
Re:Show HN: A chrome extension that fades out old links on H... by vbernat on Thursday August 16, 2018 @03:37PM (#17777822)
I can offer my partial explanation why this happens. When a site wants to stylize the underline using a background property, it cannot change this property for :visited. This includes sites trying to have a different color for the underline (CSS text decoration module 4, supported by both Firefox and Chromium now) or trying to ensure the underline do not touch a glyph (not supported natively in Firefox, CSS text decoration module 4 too) or wanting to control the width of the underline (still CSS text decoration module 4, not supported by anything). Hopefully, this will go away in the future.

Some sites may also just don't see the value of distinguishing visited links from unvisited ones. That's a shame.

Re:Show HN: A chrome extension that fades out old links on H... by rasz on Thursday August 16, 2018 @04:28AM (#17772928)
I hate it soo much. Pervasive spying doesnt help either. YT for example loves to generate custom redirects for all offsite links posted in video description/comments :(.

You can fix videos by injecting

    // make visited links distinct
    injectStyle('.yt-lockup-title a:visited {color: black;}');
    injectStyle('#watch7-sidebar .video-list-item a .title {color: #167ac6;}');
    injectStyle('#watch7-sidebar .video-list-item a:visited .title {color: #141761;}');
    injectStyle('a.yt-uix-sessionlink {color: #167ac6 !important;}');
    injectStyle('a.yt-uix-sessionlink:visited {color: #141761 !important;}');
but things like external links and playlists require looping over document.getElementsByClassName("yt-uix-sessionlink"), monitoring DOMNodeInserted, and injecting history.pushState(null, null, 'https://www.youtube.com/watch?v='+videoID) for all the garbage filled YT links (what you get when clicking on playlist video). I pack all of it into my custom tempermonkey script.
Re:Show HN: A chrome extension that fades out old links on H... by ishitatsuyuki on Thursday August 16, 2018 @07:08AM (#17773603)
Probably the web is trying to align behaviour with native apps? I don't know much apps that express if you have seen something through the UI.
Re:Show HN: A chrome extension that fades out old links on H... by Fnoord on Thursday August 16, 2018 @06:11AM (#17773354)
How much work would it be to support all websites by default with this feature?
Re:Show HN: A chrome extension that fades out old links on H... by SomewhatLikely on Thursday August 16, 2018 @03:46AM (#17772716)
It says it works on mobile, but the button only says Add to Desktop when I visit from mobile chrome. How do I get it working on mobile? Does Chrome on Android even support extensions?
Re:Show HN: A chrome extension that fades out old links on H... by r3bl on Thursday August 16, 2018 @04:14AM (#17772843)
> Does Chrome on Android even support extensions?

Nope. Only Firefox does (as far as I know).

EDIT: Apparently Yandex is built on Chromium and allows installation of Chrome desktop extensions (only in the alpha version though). Maybe that's what author meant: https://play.google.com/store/apps/details?id=com.yandex.bro...

Re:Show HN: A chrome extension that fades out old links on H... by anotheryou on Thursday August 16, 2018 @03:30AM (#17772655)
wow, i started writing something similar yesterday.

mine will fade out all that have been "seen" (not visited) and in a generic manner so it will work on all sites. I'm not sure yet if automatically or with a button press.

maybe with a button press and only those links that have been visible in the viewport (if performance allows tracking the position of every link)

is yours open source? if love to steal how you save all the links.

Re:Show HN: A chrome extension that fades out old links on H... by rasz on Thursday August 16, 2018 @04:30AM (#17772936)
I wrote https://github.com/raszpl/hackahackernews to do it on HN. Tracks posts and comments.
Re:Show HN: A chrome extension that fades out old links on H... by anotheryou on Thursday August 16, 2018 @06:42AM (#17773500)
I'll check that out :) I currently use a chrome webextention for HN I somehow managed to get in to firefox:

https://github.com/guiambros/HNMarkAllRead

For my endavour I guess I should use a DB and never really had to before. For a generic solution I don't wint to push it all in to one big array but split by domain or something.

Re:Show HN: A chrome extension that fades out old links on H... by sergz on Thursday August 16, 2018 @05:02AM (#17773116)
Wow, I did a very similar thing but didn't polish it to present. https://auhaneco.github.io/
Re:Show HN: A chrome extension that fades out old links on H... by jplayer01 on Thursday August 16, 2018 @04:07AM (#17772811)
This is cool. Is there something similar for FF?
Re:Show HN: A chrome extension that fades out old links on H... by guilhas on Thursday August 16, 2018 @07:39AM (#17773750)
visited link enabler – Add-ons for Firefox – https://addons.mozilla.org/en-US/firefox/addon/visited-link-...
Re:Show HN: A chrome extension that fades out old links on H... by jplayer01 on Thursday August 16, 2018 @06:14PM (#17778849)
Seems like this requires you to click on a link before it fades out, while OP's extension doesn't.
Re:Show HN: A chrome extension that fades out old links on H... by cift on Thursday August 16, 2018 @05:22AM (#17773189)
Is there source code available? Would like to get this working on Firefox
Re:Show HN: A chrome extension that fades out old links on H... by jupake on Friday August 17, 2018 @03:29AM (#17780952)
This a fantastic UX idea.