Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2020, 06:50 PM   #1
iG0R
Enthusiast
iG0R began at the beginning.
 
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.
iG0R is offline   Reply With Quote
Old 04-15-2020, 10:48 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,289
Karma: 27111240
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?
kovidgoyal is offline   Reply With Quote
Old 04-16-2020, 01:17 AM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,699
Karma: 168959600
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by kovidgoyal View Post
3. No clue about that, though why do you want to log into your google account to lookup words?
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.
Attached Thumbnails
Click image for larger version

Name:	google_signin_calibre_viewer.png
Views:	149
Size:	100.5 KB
ID:	178439  
DNSB is offline   Reply With Quote
Old 04-16-2020, 01:20 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,289
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yeah I doubt google dictionary lookup is affected by logging in or not.
kovidgoyal is offline   Reply With Quote
Old 04-16-2020, 01:24 AM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,685
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DNSB View Post
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.
But they can

BR
BetterRed is offline   Reply With Quote
Old 04-16-2020, 02:18 AM   #6
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by BetterRed View Post
But they can

BR
as in Google puts you on the maybe illiterate: send him more encyclopedia ads targetted list ?
stumped is offline   Reply With Quote
Old 04-16-2020, 05:51 AM   #7
iG0R
Enthusiast
iG0R began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
Quote:
Originally Posted by kovidgoyal View Post
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?
Hi

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))
Or it'll be even better,to add additional context menu's item to specify this factor by the user.

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.

Quote:
Originally Posted by DNSB View Post
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.
Wow! How did you manage to do this?
iG0R is offline   Reply With Quote
Old 04-16-2020, 09:33 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,289
Karma: 27111240
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??
kovidgoyal is offline   Reply With Quote
Old 04-16-2020, 10:34 AM   #9
iG0R
Enthusiast
iG0R began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
Quote:
Originally Posted by kovidgoyal View Post
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??
1. Alas my main programming language is Assembler, I understand other languages but afraid of making mess in others code.

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}
as a translation helper.
iG0R is offline   Reply With Quote
Old 04-16-2020, 10:41 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,289
Karma: 27111240
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?
kovidgoyal is offline   Reply With Quote
Old 04-16-2020, 11:26 AM   #11
iG0R
Enthusiast
iG0R began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
Quote:
Originally Posted by kovidgoyal View Post
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?
1. Thank you! I'll try it but need some time to refresh my memory about Python (last time I used it it was about 3-4 years ago) and now as a doctor I don't have much spare time.

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.
iG0R is offline   Reply With Quote
Old 04-16-2020, 11:53 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,289
Karma: 27111240
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.
kovidgoyal is offline   Reply With Quote
Old 04-16-2020, 02:18 PM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,699
Karma: 168959600
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DNSB View Post
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.
Quote:
Originally Posted by iG0R View Post
Wow! How did you manage to do this?
I scrolled in the lookup window until I saw the Sign in button, clicked on it, up popped the Google Choose an account screen, selected my account, entered the password, clicked next and that's all she wrote.
Attached Thumbnails
Click image for larger version

Name:	wintenberry.png
Views:	129
Size:	155.4 KB
ID:	178451   Click image for larger version

Name:	sign_in.png
Views:	139
Size:	172.0 KB
ID:	178452   Click image for larger version

Name:	signed_in.png
Views:	136
Size:	196.8 KB
ID:	178453  
DNSB is offline   Reply With Quote
Old 04-16-2020, 03:06 PM   #14
iG0R
Enthusiast
iG0R began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
Quote:
Originally Posted by DNSB View Post
I scrolled in the lookup window until I saw the Sign in button, clicked on it, up popped the Google Choose an account screen, selected my account, entered the password, clicked next and that's all she wrote.
Hm, it's weird. Look at my screenshots.
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.
Attached Thumbnails
Click image for larger version

Name:	Calibre-SignIn-1-2020-04-16_214115_2.jpg
Views:	137
Size:	415.3 KB
ID:	178454   Click image for larger version

Name:	Calibre-SignIn-2-2020-04-16_214158_2.jpg
Views:	137
Size:	275.8 KB
ID:	178455   Click image for larger version

Name:	Calibre-SignIn-3-2020-04-16_215739_2.jpg
Views:	138
Size:	277.0 KB
ID:	178456  
iG0R is offline   Reply With Quote
Old 04-16-2020, 04:01 PM   #15
iG0R
Enthusiast
iG0R began at the beginning.
 
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();
instead of new
Code:
if (window.location.hostname === 'www.google.com') {
    window.addEventListener('DOMContentLoaded', fix_google_markup);
}
because lookup.js doesn't work as it supposed to be.
Attached Thumbnails
Click image for larger version

Name:	Calibre-lookupjs-2020-04-16_225429_2.jpg
Views:	131
Size:	411.5 KB
ID:	178457  
iG0R is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 12:32 PM.


MobileRead.com is a privately owned, operated and funded community.