|
|
#16 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Sorry, my bad, it has to be
Code:
if (window.location.hostname === 'www.google.com') {
window.addEventListener('DOMContentLoaded', fix_google_markup());
}
|
|
|
|
|
|
#17 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,443
Karma: 174510100
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,627
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, that's wrong. If you add () it means the function is called when the script is loaded instad of when the DOM is ready.
|
|
|
|
|
|
#19 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,627
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And it works fine for me
|
|
|
|
|
|
#20 | |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
I'm using 4.13 version could it work properly in your case due to you utilize version with Python 3.x support?
|
|
|
|
|
| Advert | |
|
|
|
|
#21 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,627
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont see how the python version would have any effect on javascript running inside the browser and it works for me with python 2 as well. it might be a timing issue since the google page is JS based as well. Try changing it to:
Code:
window.addEventListener('DOMContentLoaded', function() { setTimeout(fix_google_markup, 100); } );
|
|
|
|
|
|
#22 | |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
|
|
|
|
|
|
|
#23 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,627
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
right click on it open the inspect tool and see why its not working for you
|
|
|
|
|
|
#24 | |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
Also I've tried to modify lookup.js to change CSS but faced with the strange results. lookup.js: Spoiler:
Blocks #2 and #3 don't work for 'translate.google.com', i.e. Google Translate aren't changing at all - as it was "white" it still remains "white". But for 'www.google.com' all Blocks (#1, #2, #3) work perfect. |
|
|
|
|
|
|
#25 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
I tried your latest commit
Code:
if (!cc) {
if (++num_tries > 10) return;
setTimeout(fix_google_markup, 100);
return;
}
|
|
|
|
|
|
#26 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,627
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is an inspect entry in the menu which you should use, at least there is one if you are actually running from source. https://manual.calibre-ebook.com/develop.html
|
|
|
|
|
|
#27 | |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
|
|
|
|
|
![]() |
|
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 08:39 AM |
| Lost comments in "book details" window | tcreek | Library Management | 5 | 06-23-2018 06:36 PM |
| Cannot dock "Book Browser" window [SOLVED] | Dr. Drib | Sigil | 4 | 06-25-2013 05:12 PM |
| "No hack" comic book viewer on ALL eink kindles! | geekmaster | Kindle Developer's Corner | 36 | 05-18-2012 11:53 AM |
| E-book Viewer Updates "Date Modified" on File. Why? | spedinfargo | Calibre | 3 | 02-28-2011 06:24 PM |