Closed taquangtrung closed 2 years ago
Inspect these lines in app/browser/buffer.py
:
self.buffer_widget.dark_mode_js = open(os.path.join(os.path.dirname(__file__),
"node_modules",
"darkreader",
"darkreader.js")).read()
This is where the js file is read. Rename to *_raw
, then inspect this line:
self.caret_browsing_js = self.caret_browsing_js_raw.replace("%1", cursor_foreground_color).replace("%2", cursor_background_color)
You can simply specify a color when the dark mode is turned on.
@MatthewZMD Thank you for the information. I'll take a look at the code.
Hi,
I'm using EAF browser in dark mode, and the current background color of selected is kind of hard to see
I figured out that it is configured by the code
selectionColor: 'auto'
at line 357 innode_modules/darkreader/darkreader.js
(this file is downloaded after installation)Can you advise if it is possible to implement a feature in EAF-browser that allows to change this setting in
darkreader.js
?For example, here is the screenshot where I set
selectionColor: '#ffb012'
, which is much easier to see the selected text.I'm not so familar with Node.js, hence not sure if it is possible to implement such feature from the Emacs codebase of EAF-browser.