11

I love Google Docs.
I hate their white-only style.
I love writing at night...

So I made myself a userscript to help my eyes when working late. Unfortunately they have css classes' names constantly changing (dynamically generated) with each update of the source code and I was too lazy to go full javascript on them because it'd make a lot of "getElement..." stuff or even jQuery only to change the theme.

It wasn't like full broken page, no... only some elements were broken, but in places it'd burn your eye out in 2am when the theme is almost black.

I felt like I have to do something, because I don't want to lose the Docs at night, but writing on their email list would be like talking to the wall. Then they updated again, some elements changed again and I was like... man, fuck you!

div#doclist > div > div > div > div > div > div > div > div+div
div#doclist > div > div > div > div > div > div > div > div > div > div+div

It works, if you are interested: https://github.com/KeyWeeUsr/...

Comments
  • 3
    Isn't there a CSS GPU invert colour property? I remember like -webkit-effect or something...
  • 1
    quite impressive
  • 4
    @ToshNeox Sure there is, but it'd _invert_ the colors, not make them pleasant for using in the night :P The result would be something like Windows' contrast theme I think + they had some blue buttons and stuff like that, so I could end up with some weird orange-brown colors too :-/
  • 2
    Didn't they add a page background colour option? I know I needed one a few years back and they didn't have it then, but thought I head they added it
  • 2
    It seems it is there *File > Page setup > Page color*
  • 2
    @hcaz No, that's not the problem. It's the whole theme, because everything is too bright. I meant this: https://raw.githubusercontent.com/K... :P
  • 2
    isn't there a google api for accesing google docs so that you can connect it to your favorit markdown editor?
  • 3
    @KeyWeeUsr ohh okay yes I misunderstood, my bad! Well good job solving the problem haha!
  • 3
    @heyheni I wonder if that's true. Ping me if you find it. But still I think the Docs web is made really well and I didn't wanted to stop using it.
  • 2
    Had a look at github. Impressed by the will to fix it.

    Must confess though that I wonder if it would be possible to write an general extension that parses all the colours at a web page and calculates new dark colours? Quite a bit of work, but would be highly useful. I love the "reader" view of Safari for example that does away with all the crap and gives me a clean page to read.
  • 3
    if you're just looking for something that doesn't burn your eyes horribly at night f.lux is awesome for me. ever since I started using it, I've been sleeping better and felt considerably less eye strain in general.
  • 1
    @javajavajava proud user of f.lux here, I see you know the struggle :)
  • 1
    @Elkstorm Actually, it would. I'v been thinking about that when I was still struggling the userscript. But that beast will be hungry, like.. really hungry. I thought I could catch all the elements, then have some table of shades (or just use something to lower the saturation of each element), but if I'd encounter something like Docs or infinite scrolling, it could result in freezing.
  • 0
    @KeyWeeUsr It would get you most of the way there though, without too much effort
  • 1
    Flux, Redshift?
  • 0
    @gloslistan don't know about redshift, but f.lux only darkens the whole screen, it won't make a dark theme usable with the same screen light - which is annoying if you work with multiple dark themed programms.
  • 1
    Good job, bro. I bet that took a lot of time. You're doing some good work
  • 0
    @tisaconundrum Thanks! It was rather annoying to play whack-a-mole with google updates, but otherwise a nice experience.
Add Comment