yafp / ttth

ttth (talk to the hand) is an electron based desktop app for online services like WhatsApp, Threema, Telegram, Twitter, Google and several others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

custom css for single service (injecting css to webview)

yafp opened this issue · comments

commented

Question is how could i inject css to a single webview

commented

working example

const fs = require('fs')
const path = require('path')
webview.insertCSS(fs.readFileSync(path.join(__dirname, 'css/ttth/services_css/whatsapp.css'), 'utf8'));

I tested it inside the eventListener 'did-start-loading'.
css values might need !important to work

I did use the example css code for whatsapp from https://codepen.io/tanjalehner/pen/bgzpQx for my tests

commented

From my point of view

  • it would be nice to have it (+)
  • sounds like a never-ending work to adjust to css-changes single services might implement (-------)

So - i doubt we gonna see that in ttth