Menu

For all present and future greasemonkey-users, i've again coded a userscript:
This script is based on the idea by slomox "Tatoeba Edit Insert Links" http://userscripts.org/scripts/show/101067
he mentioned it on the tatoeba wall here: http://tatoeba.org/deu/wall/sho...3#message_5693
It adds links for easily adding special characters into the translation box, just below each translation box, just as slomox script does.
My enhancments are, that you can now choose from a dropdown list of which languages' symbols or symbol-set you need right now, because a chinese user might need other symbols than a german one etc.
Also, if you change the translation language in the dropdown from "Auto detect" to your language, this will add the respective symbol set.
As my other script also does, the script fetches the last line (or any other you specify) of your profile and adds the symbol sets of the list defined there.
You can also dynamically remove symbol sets (by clicking on the minus-symbol).
In the symbol set some symbols are listed as e.g. "x...y", meaning that clicking on "x" prepends "x" and clicking "y" appends "y" to the currently active selection respectively. If you click on the "..." link then both "x" is added before and "y" is added after the current selection.
I have also added some speacial features like "toUpperCase" or "toLowerCase" or "toTitleCase", that i guess could be of use in certain situations.
Although the script should work pretty good by now, it still lacks good sets of symbols, but as i am not native in all languages i cannot know what symbols are needed in each of them. I have for the moment copied and adapted a list of symbols from the german wikipedia symbol insert helping script, and some examples. I would need you to tell me, which ones you need and which ones not, and which ones are the proper symbols (for instance the quote-symbols are often used wrongly in some languages) or even symbol-conbinations.
I hope you enjoy using my script, waiting for feedback,
jakov

Did you forget the link? I don't see it in your post.
The script is situated here: http://userscripts.org/scripts/show/102000
I recommend switching to this script if you installed my greasemonkey script.

Oops, yes. Thank you. I irritated myself with the link to your script ;)

>As my other script also does, the script fetches the last
>line (or any other you specify) of your profile and adds
>the symbol sets of the list defined there.
I tried that and the scripts fails if I do it. It works, if the last line does not contain a list of languages.
The error is:
Fehler: uncaught exception: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: jar:file:/[...]/components/greasemonkey.js :: <TOP_LEVEL> :: line 415" data: no]

Do i remember it right, that you are using chrome? Because if so, it didnt work for me either, but i forgot to test it until now :( - shame on me. But now it should work perfectly also in chrome.
About the fetching of the array: please make sure it is in the very last line *at all*, so no blank lines afterwards if you are editing your profile.

I usually use Firefox 4. I tested it on two different machines and both show the same behaviour: works well if I do not specify any languages in the last line of my profile but breaks if I do so.
I also tested it on Chrome: works well if I do not specify any languages in the last line of my profile but breaks if I do so. Even worse, I cannot edit Tatoeba at all.

have you tried the updated version?

Yes. Apparently the error does occur in a Greasemonkey file and not directly in your script. Perhaps the error is the wrong Greasemonkey version? I used version 0.9.2 and now tested the newest version 0.9.3. Doesn't work in both. Which version of Greasemonkey do you use?

Im using version 0.9.2, but i meant that i have updated the script at userscripts.org, have you downloaded it again?

Yes, I have.

Can you see the little dropdown box? Because then it would generally work, but not recognize your languages.
I have added some console logging to the script. Maybe you could tell me what is the last message you get from my script.

The script produces no visible output. No dropdown box.
The last messages when the page is loaded are:
- profile_path is http://tatoeba.org/deu/user/profile/slomox
- mylangs is now deu,epo,eng,fra
- helper()-function started
As soon as I hover the mouse over the div with the translations
- uncaught exception [..]
- addsymbols
are the next messages.

Could you try to replace this line
$('.sentences_set').live("mouseover", addsymbols);
with this one: $('.sentences_set').each(addsymbols);
I will try to find a fix for the problem as soon as possible, but http://tatoeba.org/eng/sentences/show/341725
;)

And before I forget it: Well done! Great work!

Thank you! :)