Comment Comment by koolba I'm no JS expert[1] but this doesn't look correct: # https://github.com/marlabrizel/genius-blocker/blob/master/lib/genius/blocker.rb#L11 var annotated = window.location.href.indexOf("genius.it/") != -1; if (annotated) { window.location.href = window.location.href.replace("genius.it/", "") } Wouldn't this match any instance of "genius.it" throughout the URL, not just at the beginning?For example it'd match "https://example.com/blog/how-to-block-genius.it" and redirect the user to a (probably) non-existent link with that string removed.[1]: I just play one on HN. parent koolba 10 years ago
For example it'd match "https://example.com/blog/how-to-block-genius.it" and redirect the user to a (probably) non-existent link with that string removed.
[1]: I just play one on HN.