yafp/ttth

custom css for single service (injecting css to webview)

yafp opened this issue · 2 comments

yafp commented

Question is how could i inject css to a single webview

yafp 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

yafp 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