Coder Social home page Coder Social logo

insin / comments-owl-for-hacker-news Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 2.0 2.42 MB

Browser extension which makes it easer to follow comment threads on Hacker News across multiple visits, allows you to annotate and mute users, and other UI tweaks and mobile UX improvements

JavaScript 70.48% HTML 7.50% CSS 15.29% Swift 6.73%
comment-highlighting hacker-news-comments user-blocking user-notes

comments-owl-for-hacker-news's Introduction

Recent Releases

  • 2024-04-08control-panel-for-twitter v3.24.0
    Browser extension which gives you more control over your Twitter timeline and adds missing features and UI improvements - available for desktop and mobile browsers
    v3.24.0 release notes
    • Added an option to hide Jobs (enabled by default)
    • Added a "Show under focused tweets" sub-option to "Hide Bookmark button under tweets", which lets you show the bookmark button under focused tweets while hiding it elsewhere
    • Added a "Number of followers" sub-option to "Show people with over 1 million followers", which lets you show replies from people with 1K, 10K or 100K followers instead, as Premium is now being forced on certain users
    • Hide Premium upsells now hides the Highlights and Articles tabs in your own profile if you're not subscribed to Premium
    • Simplified the name of the option which hides sidebar contents to just "Hide sidebar contents"
    • Renamed a number of "Twitter Blue" options to "Premium"
    • Fixed getting Tweet and user info from React state - fixes restoring links under Tweets and showing/hiding blue check replies based on follower count

    Available in the following extension stores:

    Apple App Store Chrome Web Store Firefox Add-ons Edge Add-ons

  • 2024-03-18astro-lazy-youtube-embed v0.4.0
    Embed YouTube videos with a static placeholder which only embeds when you click
    v0.4.0 release notes

    Added

    • Added a thumbnail prop, enabling use of the alternate screenshot thumbnails YouTube provides
    • Added a cookie flag prop to opt-in to using www.youtube.com/embed instead of www.youtube-nocookie.com/embed
    • Added JSDoc to props to improve editor DX

    Changed

    • The embed now uses www.youtube-nocookie.com/embed by default
    • The static embed thumbnail <img> now uses loading="lazy" by default
    • The static embed now uses a black background, so there isn't a flash of gradient when the thumbnail <img> lazy-loads
    • The static embed now uses i.ytimg.com instead of img.youtube.com for the thumbnail <img>, as per the YouTube site and its API
    • The modestbranding embed parameter was deprecated by YouTube on August 15, 2023 and now has no effect - removed it from the embedParams defaults and marked it as deprecated
    • The thumbnailRes prop now also supports passing the mq/hq/sd abbreviations YouTube uses

    Fixed

    • Fixed overriding defaulted <iframe> attributes - Astro doesn't merge attributes on HTML elements, so user-supplied attributes need to come first
  • 2024-03-07control-panel-for-youtube v1.1.0
    Browser extension which gives you more control over YouTube by adding missing options and UI improvements - for desktop & mobile browsers
    v1.1.0 release notes
    • Fixed Firefox permission issues (the extension was disabled by default after install on all platforms, it had to be manually enabled every time in Firefox for Android, and the Permissions page was completely blank in Firefox for Android so permissions couldn't be granted) by using Manifest Version 2 instead for the Firefox version
    • Improved the Japanese translation (thanks @Catastravia)
    • Fixed disconnectObservers() only disconnecting page observers

    hideShareThanksClip:

    • Added a new option to hide the Share/Thanks/Clip buttons under a video (not enabled by default)

    hideChannels:

    • You can now hide a channel while watching one of its videos - a "Hide channel" item is added to the video's ⋯ menu
    • This becomes an "Unhide channel" menu item if the channel is already hidden

    hideOpenApp:

    • Fixed hiding "Open App" links when using YouTube in Japanese

    hideSponsored:

    • Fixed related videos being hidden in the mobile version at tablet sizes when they contained an ad

    Available in the following extension stores:

    Mac App Store Chrome Web Store Mozilla Add-ons Edge Add-ons

  • 2023-10-19comments-owl-for-hacker-news v2.2.0
    Browser extension which makes it easer to follow comment threads on Hacker News across multiple visits, allows you to annotate and mute users, and other UI tweaks and mobile UX improvements
    v2.2.0 release notes
    • Added an option to disable or require confirmation for hiding on list pages
    • Added an option to increase the contrast of submission text (enabled by default)

    Available in the following extension stores:

    Apple App Store Firefox Chrome

  • 2021-11-24rllmuk-ignore-topics v1.2
    Hide topics and forums you're not interested in on the Rllmuk forum
    v1.2 release notes
    • Added support for the Fluid view
    • Added a collapse control for the Fluid sidebar

comments-owl-for-hacker-news's People

Contributors

insin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kennethrapp

comments-owl-for-hacker-news's Issues

Seems to have stopped working

As of today this plugin seems to have stopped working.

Looking at console output, I'm wondering if HN changed their Content-Security-Policy header and that's what broke it. (That's purely speculation, it could be something else entirely.)

Handling "more comments..." pages

HN comment threads kind of fall apart once they have more than a few hundred comments and they get split into separate pages - this also breaks our highlighting of new comments as we count viewing the first page as your most recent "visit" to the entire item thread.

What should we do about this?

  • Reset to the last "visit" if you click the "more comments..." link so new comments get highlighted appropriately?
  • Auto-load the complete thread then apply highlighting?
  • Provide a link to react-hn with last visit details, which will let you read the entire thread in one place?

Add Safari version

Might as well add a Safari version since we now have an Apple Developer account and all the macOS/iOS styling from Control Panel for Twitter

Comment management / quality filtering

  • Ignore comments from selected users
  • Highlight comments from selected users
  • Toggle display of comments by recently-created users (often used as throwaway accounts)
  • Custom user tagging

Add extra checks for local storage support

I'm using the UserScript version of the extension in a browser without local storage support.

Although some parts of the code do check for the presence of local storage support in the browser, many parts do not.

This results in the script breaking in browsers with no local storage.

Please consider adding extra checks to handle such situations.

Example Fix

I modified v47 of the user script to include a few more checks for local storage. This makes the comment controls work, at least, which is all I use the extension for.

Here is a comparison before/after the fixes:
https://editor.mergely.com/UTLOX9CM

FIx handling of comments which are collapsed by default

For comments which are collapsed by default by Hacker News' own JavaScript (those with a .coll class), we're currently trying to access the comment's children before we've created a HNComment object for every comment on the page, which is breaking the ability to show the pre-collapsed comments.

Improve notes

Get rid of the Add/Edit/Save buttons - always have notes displayed as a <textarea>

Notes should be saved when focus is lost

This will also make notes easier to use in hover cards #16

Sync user notes and block list

Hello, thank you for working on this addon.

Do you plan adding synchronisation support?

I read HN on two computers and two phones, Firefox (with sync always on) everywhere and it would be great if user notes and block list would be synchronized between them.

"Read later" functionality

Add something which lets you keep the previous visit details if you're reading new comments and have to go do something else so you can come back to the current page with the same new comments highlighted.

Say you had a "Read later" button - clicking it would store lastVisit in localStorage for this item again:

firefox_7bsKoaVyXC

Set new comment highlight colour and style

  • Choose highlight background colour
  • Choose highlight style (background colour or vertical bar)
  • Choose colour for vertical bar highlight (separate from background colour setting) - default to using the top bar colour

User hover cards

  • Add hover cards when you mouse over user names, which pull profile info and display notes
  • Make notes editable via hover cards
  • Update notes in the current page when changed in a hover card
  • Add a toggle option for notes being displayed in comments

Sync comment pages up with changes to mutes and notes

If you change a user's mute status or note, we could update any comment pages open in other tabs accordingly

We don't currently handle unmuting on those pages as it hasn't been possible before - would need to figure out the logic for that (e.g. we stopped adding controls to muted comments and their children on initial load, so we'd need to handle that if a comment is about to be displayed for the first time due to unmuting)

  • Mute a user when they're muted in another tab
  • Implement updating comment screens when a user is unmuted and do it when a user is unmuted in another tab
  • Fix next/prev nav links on comments when siblings are muted/unmuted and show them again

Add custom CSS options (desktop and mobile)

Add options to provide custom CSS via a <textarea> in extension options and on your profile page

e.g. for more comfortable comment reading on desktop

#hnmain { max-width: 72ch; }
.comment{ line-height: 1.5rem; font-size: .875rem; padding-right: 1rem; }
.default p { margin-top: 1rem; }

Mobile styling

Using the same breakpoints as HN:

Navigation:

  • Better mobile navigation which displays below the header row instead, hiding the default header nav links

Comments:

  • Hide root/parent/next/prev nav as we're probably breaking it by having our own comment collapsing implementation, plus the idea is we don't need it as we're going to auto-collapse read threads and highlight new comments, plus they tend to overflow the meta bar as soon as comments start nesting
  • Make the collapse/expand control a slightly larger target on mobile
  • Allow comments to go right to the edge - HN has some weird breakpoints based on specific device widths
  • Improve styling of the highlight/collapse controls at the top

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.