![]() |
#1 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
E-book viewer: "Lookup words" window
Hi, Kovid.
Could it be possible to add some features to "Lookup words" window: 1. adjusting font size more precisely than right-clicking and selecting between ZoomIn or ZoomOut 2. apply color scheme so this window could match overall style of the viewer's main window as now it's weird to read in black/sepia mode with extremely white "Lookup words" window nearby 3. solve an issue while trying to sign in Google account since now there is only one result: "Couldn't sign you in This browser or app may not be secure. Learn more Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in." Best regards, Igor. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,284
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1. That is the zooming feature provided by webengine, I'm not sufficiently motivated to write my own.
2. How would one apply a color scheme to arbitrary websites in a way that didn't break them 3. No clue about that, though why do you want to log into you google account to lookup words? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,694
Karma: 168959600
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The funny thing is that for me, I can sign into my Google account though I can't see any improvement in the results from Google Search by doing so.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,284
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yeah I doubt google dictionary lookup is affected by logging in or not.
|
![]() |
![]() |
![]() |
#5 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,685
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
|
![]() |
![]() |
![]() |
#7 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
![]() 1. I didn't suggest to rewrite zooming feature, only to change ZoomFactor in calibre/src/calibre/gui2/viewer/lookup.py Code:
def zoom_in(self): self.setZoomFactor(min(self.zoomFactor() + 0.2, 5)) def zoom_out(self): self.setZoomFactor(max(0.25, self.zoomFactor() - 0.2)) 2. the same way as it did in "Dark Reader" https://github.com/darkreader/darkreader 3. Due to this fact: Upcoming changes to history Translation history will soon only be available when you are signed in and will be centrally managed within My Activity. Past history will be cleared during this upgrade, so make sure to save translations you want to remember for ease of access later. Wow! How did you manage to do this? |
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,284
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1. Again not really worth the effort for me. But patches are welcome.
2. dark reader is an awful hack it breaks things all the time and requires site specific workarounds for just that 3. What has translation got to do with dictionary lookup?? |
![]() |
![]() |
![]() |
#9 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
2. Could it be possible to integrate Dark Reader as an add-on? 3. Because I used "Add more sources" button in "Lookup words" panel and added Code:
https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text={word} |
|
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,284
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1. Dont worry if you make a mess I will tell you how to clean the mess before merging your code
2. No, not really I am firmly against such hacks. What I would entertain is the ability to have site-specific CSS, which you can add for instance for google properties in lookup.js in the calibre source code. 3. Again, I have no clue why login would fail and I stil dont understand why you need to login at all. With the supplied URL, you will get the translation as needed. Why do you need translation history in a lookup function? |
![]() |
![]() |
![]() |
#11 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
![]() 2. At the moment, Dark Reader is already a monstrous tool that can solve many issues in terms of changing the appearance of sites + it has an already developed database of "problem" sites. Would it be more correct to plug it in as an add-on than to actually re-write Dark Reader for Caliber? 3. It's very convenient to have translation history for making Anki flashcards to study foreign languages or to learn unknown words. Since there will be changes how translation history would be handled by Google users need to login if they want to continue memorizing their history. |
|
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,284
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
2. there already exist specific dark mode stylesheets for many website including google, you just need to import one
3. Well i'm afraid that's too niche a use case for me. Again, patches welcome. |
![]() |
![]() |
![]() |
#13 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,694
Karma: 168959600
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
I don't have any possibility to choose my account although I've already signed in my account in Chrome browser. Also I found the following thread https://support.google.com/chrome/thread/31420989?hl=en Kovid Please, take a close look how layout of the page with a tall image changes. In the first and second screenshots E-book viewer fits tall image with linked text but in the third - it doesn't. What a weird behaviour. |
|
![]() |
![]() |
![]() |
#15 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Kovid
There is some issue in new calibre/resources/lookup.js Please, leave old Code:
if (window.location.hostname === 'www.google.com') fix_google_markup(); Code:
if (window.location.hostname === 'www.google.com') { window.addEventListener('DOMContentLoaded', fix_google_markup); } |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
E-book viewer: clicking on image to evoke "View image" window. | iG0R | Calibre | 12 | 04-15-2020 07:39 AM |
Lost comments in "book details" window | tcreek | Library Management | 5 | 06-23-2018 05:36 PM |
Cannot dock "Book Browser" window [SOLVED] | Dr. Drib | Sigil | 4 | 06-25-2013 04:12 PM |
"No hack" comic book viewer on ALL eink kindles! | geekmaster | Kindle Developer's Corner | 36 | 05-18-2012 10:53 AM |
E-book Viewer Updates "Date Modified" on File. Why? | spedinfargo | Calibre | 3 | 02-28-2011 05:24 PM |