You can use userscripts [1] which is a safari extension which allows you to add userscripts, and the author of this work have an userscript [2] that you can use with safari (or any other browser)
[1] https://github.com/quoid/userscripts
[2] https://github.com/imdj/HNRelevant/blob/main/HNRelevant.user...