zserge / awfice

The world smallest office suite
MIT License
3.59k stars 159 forks source link

Moved CSS stuff to <style> #26

Closed doekman closed 4 years ago

doekman commented 4 years ago

Saved 22 bytes by moving style settings to a <style>-block.

doekman commented 4 years ago

I think I can shave of another 7 bytes by replacing v.charAt(0) with v[0]. According to MDC array-like access has been introduced in ECMAScript 5 and can be used.

"".charAt(0) != ""[0], but it still yields the result we want.

Also, String.fromCharCode(65+j-1) could be String.fromCharCode(64+j), shaving 2 bytes.

Not sure if you guys want multiple changes in one PR.