Commit e505034
committed
vimhelp: Add offline light/dark mode support
Make light/dark mode completely offline, instead of relying on server.
Currently the logic is already almost completely client-side via cookie,
but it sends the requested mode to the server, which pre-generates the
correct version to the client. Instead, we just have a simple JavaScript
to set it on launch. It does mean this won't work on web browsers that
turned off JS, but that's not a big deal.
Also fixed up the way cookies work as it has some special casing to make
sure neo.vimhelp.org and vimhelp.org could share the same cookies, but
that's irrelevant to MacVim's use cases and should be removed.1 parent 404cd67 commit e505034
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | 34 | | |
23 | 35 | | |
| |||
0 commit comments