Greasy Fork is available in English.

translate.google tooltip

Translates selected text into a `tooltip' via Google translate

< Opinie na translate.google tooltip

Pytanie/komentarz

§
Napisano: 29-07-2015
Edytowano: 29-07-2015

Work perfectly on one firefox profile and not to an other ....

I don't understand why it work on one firfox profile and not to an other ...
I try too:
- change the value of greasemonkey.fileIsGreaseable to "true"
like i see in your code , without any results.

Firefox 39.0
Greasemonkey 3 (tested with 3.3. beta2 too)

before i used :
Google Translator Tooltip Expanded version1.12 without any problem..

§
Napisano: 29-07-2015
Edytowano: 29-07-2015

Most likely my script is conflicting with some other add-on that intercepts Alt-Click combination.
I can't reproduce this problem on my PC; if you're interested, you may try to turn on webconsole logging:
uncomment script's line 92:

_log=console.log.bind(console);

then see
Tools → Web Developer → Web Console

§
Napisano: 29-07-2015
Edytowano: 29-07-2015

well, I've reproduced it.
the bug arises when script tries to download country flag - we get internal Greasemonkey error:
Mozilla/5.0 (Windows NT 5.1; rv:39.0) Gecko/20100101 Firefox/39.0;
Greasemonkey 3.3

greasemonkey-modules/content/xmlhttprequester.js line 182:
TypeError: req.sendAsBinary is not a function

I can advice to install a previous version of GM Firefox.

§
Napisano: 29-07-2015

I test it at work :
It work fine...

§
Napisano: 29-07-2015

you may fix it by copying working script profile from ....\Firefox\Profiles\xxxx\gm_scripts\translate.google_tooltip.db. (or remove that file)

§
Napisano: 29-07-2015
Edytowano: 29-07-2015

Seems fixed.
As it turned out, the 'binary:true' option in GM_xmlhttpRequest isn't needed.
PS: half day of work resulting in one commented line of code

§
Napisano: 10-08-2015
Edytowano: 10-08-2015
you may fix it by copying working script profile from ....\Firefox\Profiles\xxxx\gm_scripts\translate.google_tooltip.db. (or remove that file)

i test that without success...

I test too the console (by uncomment script's line 92: ):
i don't see any significant (for me).
Just 2 ref. at the Jquery library , but different:
- v. 2.1.11 (from greasyfork in my test)
- v. 1.7.2 (for your script)
:-(

What i can test more ?
I appreciate your "alt" key function ...

§
Napisano: 10-08-2015

The bug we are discussing here has appeared in Fx39 for the following reason:
my script used the option binary in the GM_XmlHttpRequest call, but that option became obsolete in the latest Firefox, so the the browser produced the 'undefined function' error.
This is fixed in the current version (3.9.10 2015-07-29) of my script.

§
Napisano: 10-08-2015
Edytowano: 10-08-2015

Thanks but:

....so the the browser produced the 'undefined function' error.

I don't see that in the console (maybe i don't watch at the right place):
only one thing i find:
1: tgtt. transla....user.js (line88)
The script don't work in this (wrong??) profile.

So, I suppose it's a problem in this profile...

i use greasemonkey 3.4 beta1:
I try too to downgrade greasemonkey but ....

i check on the working profile:
It use greasemonkey 3.3

I try too (infos read in your script - what's the reason of this about:config):
about:config -> greasemonkey.fileIsGreaseable <- true
No change too ...

Other test:
- Disable other scripts : No change too ...

I don't like when something work in a place and not an other:
An idea to find where i need to investigate ?

§
Napisano: 10-08-2015

Which version of translate.google tooltip you are using?
Is it 3.9.10?
I'd like to note that when you change the script's code on your machine, auto-updating stops working.

§
Napisano: 10-08-2015
Edytowano: 10-08-2015

I use the last:
// @version 3.9.10

I had a similar problem with GoogleMonkeyR (updated by Kilvoctu) :

GoogleMonkeyR : Not working Firefox 39

Playing with a previous version of greasemonkey solve at each time the problem...
but not with your script...

§
Napisano: 10-08-2015
Edytowano: 10-08-2015

merde, i cant start firefox39.03 with clean profile:firefox -p - not working anymore?
edit: got it! firefox -P
nevertheless, script keeps working.
i have no ideas at the moment..

§
Napisano: 10-08-2015
I had a similar problem with GoogleMonkeyR

I apologize for the self-promotion, have you tasted google-columnizer userstyle?

§
Napisano: 10-08-2015

Seems pretty....
But it didn't' provide auto-load more results
;-)

For your story of profile , you can test :
ProfileSwitcher

"It adds some options to launch easily other profiles and the Profile Manager."

§
Napisano: 10-08-2015
Edytowano: 10-08-2015

I have a suspicion that database file containing script's data is spoiled. This file is named 'translate.google_tooltip.db' and it is located somewhere in folder
"C:\Documents and Settings\DECEMBRE\Application Data\Mozilla\Firefox\Profiles\????????\gm_scripts\".
Try to close Firefox and delete/rename this file.

...auto-load more results

Here is an article on this theme.

§
Napisano: 09-03-2016
Edytowano: 09-03-2016

hi decembre,
proud to announce: i've updated my script, now you can run it thru bookmarklet:
javascript:postMessage('tgtooltip auto|fr','*')
and, by clicking on that bookmark, the text that is selected on webpage will be translated to french.
--
one nuance for Firefox users: if you spend time on Github, turn off CSP:
about:config → security.csp.enablefalse
(to make bookmarklets working on Github pages; see)

§
Napisano: 12-03-2016
Edytowano: 12-03-2016

Thanks for the info.
I had bookmarked the Bookmarklet vs CSP (Bugzilla bug report) but i see some new comments in it:
Bug 866522 - Bookmarklets affected by CSP

Unfortunately, i don't understand to many about these CSP things...

I test your bookmarklet but it seems doing nothings....
:-(
Maybe an error from me, can you provide it directly ?

I test too to modify ABOUT:CONFIG.
- about:config → security.csp.enable → TRUE to FALSE:
but that affect all sites , no ?.
That's is not a problem ?

- about:config → greasemonkey.fileIsGreaseable → FALSE TO TRUE:
I found that In your script. It seems not change something.
What's the need of that ?

PS:

...auto-load more results :

The link is dead.

§
Napisano: 12-03-2016
Maybe an error from me, can you provide it directly ?

I don't know, I have everything working.

§
Napisano: 13-03-2016

That's good now :-)
It's possible to have the traduction near the selected text ?

§
Napisano: 13-03-2016
It's possible to have the traduction near the selected text ?

Yes, if you select text with pressed Alt .

§
Napisano: 14-03-2016

héhéh...

§
Napisano: 14-03-2016
Edytowano: 14-03-2016

I am at a loss to explain this effect, initially it was not provided, it appears to be the result of an even number of bugs, but that's the positive result .

§
Napisano: 14-03-2016

That's not a problem:
Thanks !

Odpowiedz

Zaloguj się, by odpowiedzieć.