View Single Post
Old 12-29-2025, 01:17 PM   #3
simurq
Member
simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 1000010
Join Date: Jul 2015
Device: Kindle Paperwhite v1
Thank you, Kovid! Glad to hear it is possible, you made my day!

Analyzing lookup.js, I understand the rationale behind the code. That's indeed what I need. For overrides though, do I need to create a JavaScript file similar to `lookup.js` per dictionary? I've already created a resources directory under ~/.config/calibre (using Linux) but not sure what to do next. I have several dictionary sources I'd like to apply my CSS rules to.

EDIT 1: I'll experiment with extending the existing JS code to accommodate CSS rules for another dictionary resource in the same file. And will report back...

EDIT 2: I think I'm doing something wrong here, as the code fails to hide any HTML elements: https://pastebin.com/4LQVgcLH

Rustam

Last edited by simurq; 12-29-2025 at 02:31 PM.
simurq is offline   Reply With Quote