🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/07 00:25:32
🔄 下次更新时间:2026/01/07 01:25:32
手动刷新缓存

Comments Owl for Hacker News

Highlight new comments, mute users, and other tweaks for Hacker News

< Opinie na Comments Owl for Hacker News

Ocena: Dobry - skrypt działa

§
Napisano: 02-07-2020
Edytowano: 02-07-2020

Hide comment highlight controls under sublink

Nice job with this script.

I prefer to hide the highlight controls by default since they take some space, so here is code I added to achieve that. Replacing lines 464 to 466 with:

    var $timeTravelControl = $el('div', {style: {marginTop: '1em', display: 'none'},}, $range, ' ', $button);

    var $timeTravelControlReveal = $el('a', {
      onClick(e) {
        $timeTravelControl.style.display = 'initial';
        e.target.style.display = 'none';
      },
    }, 
      'highlight new comments');
    el.appendChild(document.createTextNode(' | '));
    el.appendChild($timeTravelControlReveal);
    el.appendChild($timeTravelControl);

Odpowiedz

Zaloguj się, by odpowiedzieć.