News for hackers. Stuff that matters.
Re:Text-only CNN by V99 on Sunday September 10, 2017 @04:13AM (#15211292)
FWIW, base64-js and similar libraries are still needed (though probably not in this case...) because window.btoa() only works on latin1 ASCII strings. Try giving it some arbitrary UTF-8:

btoa("\ud83d\ude0b") -> Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

(Edit: apparently HN doesn't either; changed to \u...)

Re:Text-only CNN by josteink on Sunday September 10, 2017 @07:26AM (#15211747)
> FWIW, base64-js and similar libraries are still needed

For what? This is a non-interactive text-only website. It shouldn't need anything beside HTML and CSS.

Re:Text-only CNN by eadmund on Sunday September 10, 2017 @08:17AM (#15211890)
You are 100% correct. Honestly, it doesn't need CSS even, although that's nice to have.

I've got NoScript on, and now the pages load perfectly. I think I may return to being a CNN reader now. If only they could figure out how to monetise this.

Re:Text-only CNN by V99 on Sunday September 10, 2017 @11:32AM (#15212621)
For the rest of the sentence... I was clearly referring to the question of why someone would use a library for base64 versus the built-in function. Not getting involved in the anti-js internet pitchfork mob.