Tatoeba Symbol Insert Helper

Adds links for inserting special characters into the Tatoeba translaiton boxes

  1. // ==UserScript==
  2. // @name Tatoeba Symbol Insert Helper
  3. // @copyright Jakob V. <jakov@gmx.at>
  4. // @license Creative Commons Attribution 3.0 Unported (CC BY 3.0) http://creativecommons.org/licenses/by/3.0/
  5. // @namespace http://userscripts.org/scripts/show/102000
  6. // @description Adds links for inserting special characters into the Tatoeba translaiton boxes
  7. // @include http://tatoeba.org/*
  8. // @match http://tatoeba.org/*
  9. // @grant GM_getValue
  10. // @grant GM_log
  11. // @grant GM_setValue
  12. // @require http://code.jquery.com/jquery-latest.min.js
  13. // @version 0.0.1.20150423133112
  14. // ==/UserScript==
  15.  
  16. //This script is based on the idea by slomox "Tatoeba Edit Insert Links" http://userscripts.org/scripts/show/101067
  17. //he mentioned it on the tatoeba wall here: http://tatoeba.org/deu/wall/show_message/5693#message_5693
  18.  
  19. $(document).ready(main);
  20.  
  21. function main(){
  22.  
  23. //BEGIN SETTINGS
  24.  
  25. keysets = GM_getValue('keysets');
  26. autokey = GM_getValue('autokey');
  27. facekey = GM_getValue('facekey');
  28. keysets = ( keysets==undefined ? '' : keysets );
  29. autokey = ( autokey==undefined ? true : autokey );
  30. facekey = ( facekey==undefined ? true : facekey );
  31. GM_log('keysets: '+keysets);
  32. GM_log('autokey: '+autokey);
  33. GM_log('facekey: '+facekey);
  34.  
  35. facelang = window.location.href.split('/')[3];
  36. GM_log('facelang: '+facelang);
  37.  
  38. setup = false;
  39. if(window.location.href.split('/')[4] == 'user' && window.location.href.split('/')[5] == 'profile' && window.location.href.split('/')[6] == $('.menuSection').attr('href').split('/')[4]){
  40. Array.prototype.unique = function () {
  41. var arrVal = this;
  42. var uniqueArr = [];
  43. for (var i = arrVal.length; i--; ) {
  44. var val = arrVal[i];
  45. if ($.inArray(val, uniqueArr) === -1) {
  46. uniqueArr.unshift(val);
  47. }
  48. }
  49. return uniqueArr;
  50. }
  51. setup = true;
  52. if($('.userscriptSettings').is('*')){
  53. settings = $('.userscriptSettings');
  54. }
  55. else{
  56. settings = $('<div class="module profileSummary userscriptSettings"><h2>userscripts</h2></div>');
  57. $('.profileSummary').after(settings);
  58. }
  59. settings.append('<h3>Symbol Insert Helper</h3>');
  60. contentdiv = $('<div id="symbolinserthelper"></div>');
  61. settings.append(contentdiv);
  62. contentdiv.append('<table>');
  63. contentdiv.append('<tr><td><label for="facekey" class="field">facekey</label></td><td><input type="checkbox" id="facekey" checked="'+( facekey==undefined ? 'checked' : facekey )+'"> <small>Automatically adds the set for the current interface language</small></td></tr>');
  64. contentdiv.append('<tr><td><label for="autokey" class="field">autokey</label></td><td><input type="checkbox" id="autokey" checked="'+( autokey==undefined ? 'checked' : autokey )+'"> <small>Automatically adds the set for the current phrase you are about to add</small></td></tr>');
  65. contentdiv.append('<tr></tr>').append('<td><label for="keysets" class="field">keysets</label></td>').append('<td><input disabled="disabled" id="keysets" value="'+( keysets==undefined ? '' : keysets )+'"> </td>');
  66. contentdiv.append('</table>');
  67. contentdiv.append('<div class="sentences_set"> <ul class="menu" style="display:none;"> <li class="option translateLink"> <a></a> </li> </ul> <div class="addTranslations"> <textarea style="width:100%;max-width:100%;" rows="2" class="addTranslationsTextInput">test area</textarea> <select class="translationLang" style="display:none;"> '+$('#SentenceFrom').html()+' </select> <div class="important" style="display:none;"></div> </div> </div>');
  68. $('#keysets').keyup(function(e){
  69. keysets = $(this).val().replace(/[^A-Za-z,]/g, '').replace(/,+/g, ',');
  70. GM_setValue('keysets',keysets);
  71. GM_log('keysets: '+keysets);
  72. });
  73. $('#facekey').change(function(){
  74. facekey = this.checked;
  75. GM_setValue('facekey',facekey);
  76. GM_log('facekey: '+facekey);
  77. });
  78. $('#autokey').change(function(){
  79. autokey = this.checked;
  80. GM_setValue('autokey',autokey);
  81. GM_log('autokey: '+autokey);
  82. });
  83. //keysets = (typeof(keysets)=='string' ? keysets.replace(/[^A-Za-z,]/g, '').split(',') : keysets);
  84. //GM_log("keysets is now "+keysets);
  85. //helper();
  86. }
  87. //else{
  88. // keysets = (typeof(keysets)=='string' ? keysets.replace(/[^A-Za-z,]/g, '').split(',') : keysets);
  89. // GM_log("keysets is now "+keysets);
  90. // helper();
  91. //}
  92. keysets = (typeof(keysets)=='string' ? keysets.replace(/[^A-Za-z,]/g, '').split(',') : keysets);
  93. GM_log("keysets is now "+keysets);
  94. helper();
  95.  
  96. //http://www.jquery4u.com/snippets/6-jquery-cursor-functions/
  97.  
  98. jQuery.fn.getSelectionStart = function(){
  99. if(this.lengh == 0) return -1;
  100. input = this[0];
  101.  
  102. var pos = input.value.length;
  103.  
  104. if (input.createTextRange) {
  105. var r = document.selection.createRange().duplicate();
  106. r.moveEnd('character', input.value.length);
  107. if (r.text == '')
  108. pos = input.value.length;
  109. pos = input.value.lastIndexOf(r.text);
  110. } else if(typeof(input.selectionStart)!="undefined")
  111. pos = input.selectionStart;
  112.  
  113. return pos;
  114. }
  115.  
  116. //Example jQuery get text selection end function call
  117. //$("input[name='username']").getSelectionEnd();
  118.  
  119. jQuery.fn.getSelectionEnd = function(){
  120. if(this.lengh == 0) return -1;
  121. input = this[0];
  122.  
  123. var pos = input.value.length;
  124.  
  125. if (input.createTextRange) {
  126. var r = document.selection.createRange().duplicate();
  127. r.moveStart('character', -input.value.length);
  128. if (r.text == '')
  129. pos = input.value.length;
  130. pos = input.value.lastIndexOf(r.text);
  131. } else if(typeof(input.selectionEnd)!="undefined")
  132. pos = input.selectionEnd;
  133.  
  134. return pos;
  135. }
  136.  
  137. //Example jQuery set text selection function call
  138. //$("input[name='username']").setSelection(4, 20);
  139.  
  140. jQuery.fn.setSelection = function(selectionStart, selectionEnd) {
  141. if(this.lengh == 0) return this;
  142. input = this[0];
  143.  
  144. if (input.createTextRange) {
  145. var range = input.createTextRange();
  146. range.collapse(true);
  147. range.moveEnd('character', selectionEnd);
  148. range.moveStart('character', selectionStart);
  149. range.select();
  150. } else if (input.setSelectionRange) {
  151. input.focus();
  152. input.setSelectionRange(selectionStart, selectionEnd);
  153. }
  154.  
  155. return this;
  156. }
  157.  
  158. //Example jQuery get text selection function call
  159. //$("input[name='username']").getSelection();
  160.  
  161. jQuery.fn.getSelection = function(){
  162. if(this.lenght == 0) return -1;
  163. //needs jQuery.fn.getSelectionStart
  164. var s = $(this).getSelectionStart();
  165. //needs jQuery.fn.getSelectionEnd
  166. var e = $(this).getSelectionEnd();
  167. return this[0].value.substring(s,e);
  168. }
  169.  
  170. /*//http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/
  171. $.ctrl = function(key, callback, args) {
  172. $(document).keydown(function(e) {
  173. if(!args) args=[]; // IE barks when args is null
  174. if(e.keyCode == key.charCodeAt(0) && e.ctrlKey) {
  175. callback.apply(this, args);
  176. return false;
  177. }
  178. });
  179. };
  180. */
  181. function helper(){
  182. GM_log('helper()-function started');
  183. //Charinsert taken from german Wikipedia
  184. var charinsert = {
  185. "deu":[
  186. [ "Ä", "ä", "Ö", "ö", "ß", "Ü", "ü" ],
  187. //https://secure.wikimedia.org/wikipedia/de/wiki/Anführungszeichen#Deutschland_und_Österreich
  188. [ [["„","“"], "deutsche Anführungszeichen (Deutschland, Österreich)"], [["‚","‘"], "halbe deutsche Anführungszeichen (Deutschland, Österreich)"], [["»","«"], "umgekehrt französische Anführungszeichen, Chevrons, Möwchen, Gänsefüßchen (Deutschland, Österreich)"], [["›","‹"], "halbe umgekehrt französische Anführungszeichen, Chevrons, Möwchen, Gänsefüßchen (Deutschland, Österreich)"], [["«","»"], "französische Anführungszeichen, Guillemets (Schweiz, Liechtenstein)"], [["‹","›"], "halbe französische Anführungszeichen, Guillemets (Schweiz, Liechtenstein)"], [["“","”"], "Englische Anführungszeichen (UK: erste Ebene, USA: zweite Ebene)"], [["‘","’"], "Englische Anführungszeichen (USA: erste Ebene, UK: zweite Ebene)"], ],
  189. [ [["’"], "Apostroph"], [["–"],"Bis-Strich, Gedankenstrich"], [["‐"], "Bindestrich, Trennstrich, Ergänzungsstrich, Wiederholungszeichen"], [["‑"], "Geschützter Bindestrich"], [["…"], "Auslassungspunkte"], [["⸗"], "Doppelbindestrich"], ],
  190. ],
  191. "Standard":[
  192. [[["(",")"],"runde Klammern"], [["[","]"],"eckige Klammern"], [["{","}"],"geschweifte/geschwungene Klammern, Akkoladen"], [["⟨","⟩"],"spitze Klammern, Winkelklammern"], ],
  193. [ "+", [["−"],"mathematisches Minus"], [["·"], "mathematisches Mal"], "×", "÷", "≈", "≠", "±", "≤", "≥", "²", "³", "½", "†", "#", "*",
  194. "‰", "§", "€", "¢", "£", "¥", "$", "¿", "¡", "∞", "‣", [["•"],"Aufzählungszeichen"],[["…"], "Auslassungspunkte"], "→", "↔", [["&"],"kaufmännisches Und"],],
  195. [ [["№"],"Nummernzeichen"], [["ª"],"ordfeminine"], [["º"],"ordmaskuline"], ],
  196. [ [[" "],"Geschütztes Leerzeichen", "‗"],],
  197. [ [["°"],"Grad"], [["′"],"Bogenminute"], [["″"],"Bogensekunde"] ],
  198. [ // <= another group (seperated by "•")
  199. // note that the special behaviours don't "call functions", you could name them whatever you'd like
  200. // these names are hard-coded else-where in this code; search for the names!
  201. [[""], 'title', 'UPPER', 'toUpperCase'], // converts all the selcted text to upper case
  202. [[""], 'title', 'lower', 'toLowerCase'], // converts all the selcted text to lower case
  203. [[""], 'title', 'Title', 'toTitleCase'], // converts all the selcted text to lower case
  204. [[/\b[´`']\b/, "’"], 'replace wrong apostrophes (only in between words)', '´→’', 'replace'], // replaces one text with another one
  205. [[/\s*([,.;:?!])/g, "$1"], 'Remove spaces before ,.;:?!', 'x,.;:?!', 'replace'], // replaces a regular expression with text
  206. //[[/./g, ""], 'delete', '[del]', 'replace'], // replaces a regular expression with text
  207. ],
  208. ],
  209. "CJK":[
  210. [ [["〈","〉"],""], [["《","》"],""], [["「","」"],""], [["『","』"],""], [["【","】"],""], [["〔","〕"],""], [["〖","〗"],""], [["〘","〙"],""], [["〚","〛"],""] ],
  211. ],
  212. "IPA":[
  213. //{ "class":"IPA" },
  214. ["p", "t̪", "t", "ʈ", "c", "k", "q", "ʡ", "ʔ"],
  215. ["b", "d̪", "d", "ɖ", "ɟ", "ɡ", "ɢ"],
  216. ["ɓ", "ɗ", "ʄ", "ɠ", "ʛ"],
  217. ["t͡s", "t͡ʃ", "t͡ɕ", "d͡z", "d͡ʒ", "d͡ʑ"],
  218. ["ɸ", "f", "θ", "s", "ʃ", "ʅ", "ʆ", "ʂ", "ɕ", "ç", "ɧ", "x", "χ", "ħ", "ʜ", "h"],
  219. ["β", "v", "ʍ", "ð", "z", "ʒ", "ʓ", "ʐ", "ʑ", "ʝ", "ɣ", "ʁ", "ʕ", "ʖ", "ʢ", "ɦ"],
  220. ["ɬ", "ɮ"],
  221. ["m", "m̩", "ɱ", "ɱ̩", "ɱ̍", "n̪", "n̪̍", "n", "n̩", "ɳ", "ɳ̩", "ɲ", "ɲ̩", "ŋ", "ŋ̍", "ŋ̩", "ɴ", "ɴ̩"],
  222. ["ʙ", "ʙ̩", "r", "r̩", "ʀ", "ʀ̩"],
  223. ["ɾ", "ɽ", "ɿ", "ɺ"],
  224. ["l̪", "l̪̩", "l", "l̩", "ɫ", "ɫ̩", "ɭ", "ɭ̩", "ʎ", "ʎ̩", "ʟ", "ʟ̩"],
  225. ["w", "ɥ", "ʋ", "ɹ", "ɻ", "j", "ɰ"],
  226. ["ʘ", "ǂ", "ǀ", "!", "ǁ"],
  227. ["ʰ", "ʱ", "ʷ", "ʸ", "ʲ", "ʳ", "ⁿ", "ˡ", "ʴ", "ʵ", "ˢ", "ˣ", "ˠ", "ʶ", "ˤ", "ˁ", "ˀ", "ʼ"],
  228. ["i", "i̯", "ĩ", "y", "y̯", "ỹ", "ɪ", "ɪ̯", "ɪ̃", "ʏ", "ʏ̯", "ʏ̃", "ɨ", "ɨ̯", "ɨ̃", "ʉ", "ʉ̯", "ʉ̃", "ɯ", "ɯ̯", "ɯ̃", "u", "u̯", "ũ", "ʊ", "ʊ̯", "ʊ̃"],
  229. ["e", "e̯", "ẽ", "ø", "ø̯", "ø̃", "ɘ", "ɘ̯", "ɘ̃", "ɵ", "ɵ̯", "ɵ̃", "ɤ", "ɤ̯", "ɤ̃", "o", "o̯", "õ"],
  230. ["ɛ", "ɛ̯", "ɛ̃", "œ", "œ̯", "œ̃", "ɜ", "ɜ̯", "ɜ̃", "ə", "ə̯", "ə̃", "ɞ", "ɞ̯", "ɞ̃", "ʌ", "ʌ̯", "ʌ̃", "ɔ", "ɔ̯", "ɔ̃"],
  231. ["æ", "æ̯", "æ̃", "ɶ", "ɶ̯", "ɶ̃", "a", "a̯", "ã", "ɐ", "ɐ̯", "ɐ̃", "ɑ", "ɑ̯", "ɑ̃", "ɒ", "ɒ̯", "ɒ̃"],
  232. ["ˈ", "ˌ", "ː", "ˑ", "˘", ".", "‿", "|", "‖"]
  233. ],
  234. "AHD":[
  235. //{ "class":"Unicode" },
  236. ["ā", "ă", "ä", "â", "ē", "ĕ", "ī", "ĭ", "î", "ō", "ŏ", "ô", "ŭ", [["o͞o"],"food"], [["o͝o"],"foot"]]
  237. ],
  238. "lat":[
  239. ["Á", "á", "Ć", "ć", "É", "é", "Í", "í", "Ó", "ó", "Ś", "ś", "Ú", "ú", "Ý", "ý", "Ǿ", "ǿ"],
  240. ["À", "à", "È", "è", "Ì", "ì", "Ò", "ò", "Ù", "ù"],
  241. ["Â", "â", "Ĉ", "ĉ", "Ê", "ê", "Ĝ", "ĝ", "Ĥ", "ĥ", "Î", "î", "Ĵ", "ĵ", "Ô", "ô", "ŝ", "Ŝ", "Û", "û"],
  242. ["Ä", "ä", "Ë", "ë", "Ï", "ï", "Ö", "ö", "Ü", "ü", "ÿ"],
  243. ["Ã", "ã", "Ñ", "ñ", "Õ", "õ"],
  244. ["Å", "å"],
  245. ["Ç", "ç"],
  246. ["Č", "č", "Š", "š", "ŭ"],
  247. ["Ł", "ł"],
  248. ["Ő", "ő", "Ű", "ű"],
  249. ["Ø", "ø"],
  250. ["Ā", "ā", "Ē", "ē", "Ī", "ī", "Ō", "ō", "Ū", "ū", "Ȳ", "ȳ"],
  251. ["Ă", "ă", "Ĕ", "ĕ", "Ğ", "ğ", "Ĭ", "ĭ", "Ŏ", "ŏ", "Ŭ", "ŭ", "Y̆", "y̆"],
  252. ["ß"],
  253. ["Æ", "æ", "Œ", "œ"],
  254. ["Ð", "ð", "Þ", "þ", "|"]
  255. ],
  256. "ang":[
  257. //{ "lang":"ang" },
  258. ["Ā", "ā", "Æ", "æ", "Ǣ", "ǣ", "Ǽ", "ǽ", "Ċ", "ċ", "Ð", "ð", "Ē", "ē", "Ġ", "ġ", "Ī", "ī", "Ō", "ō", "Ū", "ū", "Ƿ", "ƿ", "Ȳ", "ȳ", "Þ", "þ", "Ȝ", "ȝ"]
  259. ],
  260. "grc":[
  261. //{ "lang":"grc", "class":"polytonic" },
  262. ["Α", "α", "Ά", "ά", "Β", "β", "Γ", "γ", "Δ", "δ", "Ε", "ε", "Έ", "έ", "Ζ", "ζ", "Η", "η", "Ή", "ή", "Θ", "θ", "Ι",
  263. "ι", "Ί", "ί", "Ϊ", "ϊ", "ΐ", "Κ", "κ", "Λ", "λ", "Μ", "μ", "Ν", "ν", "Ξ", "ξ", "Ο", "ο", "", "Ό", "ό", "Π", "π",
  264. "Ρ", "ρ", "Σ", "σ", "ς", "Τ", "τ", "Υ", "υ", "Ϋ", "ϋ", "Ύ", "ύ", "ΰ", "Φ", "φ", "Χ", "χ", "Ψ", "ψ", "Ω", "ω", "Ώ",
  265. "ώ", ";", "·", "ἀ", "ἁ", "ὰ", "ᾶ", "ἂ", "ἃ", "ἄ", "ἅ", "ἆ", "ἇ", "ᾳ", "ᾀ", "ᾁ", "ᾴ", "ᾲ", "ᾷ", "ᾄ", "ᾅ", "ᾂ", "ᾃ",
  266. "ᾆ", "ᾇ", "ἐ", "ἑ", "ὲ", "ἔ", "ἕ", "ἒ", "ἓ", "ἠ", "ἡ", "ὴ", "ῆ", "ἤ", "ἢ", "ἣ", "ἥ", "ἦ", "ἧ", "ῃ", "ῄ", "ῂ", "ῇ",
  267. "ᾐ", "ᾑ", "ᾔ", "ᾒ", "ᾕ", "ᾓ", "ᾖ", "ᾗ", "ἰ", "ἱ", "ὶ", "ῖ", "ἴ", "ἲ", "ἵ", "ἳ", "ἶ", "ἷ", "ὸ", "ὀ", "ὁ", "ὄ", "ὅ",
  268. "ὂ", "ὃ", "ῤ", "ῥ", "ὐ", "ὑ", "ὺ", "ῦ", "ὔ", "ὕ", "ὒ", "ὓ", "ὖ", "ὗ", "ὠ", "ὡ", "ὼ", "ῶ", "ὤ", "ὢ", "ὥ", "ὣ", "ὦ",
  269. "ὧ", "ῳ", "ῴ", "ῲ", "ῷ", "ᾠ", "ᾡ", "ᾤ", "ᾢ", "ᾥ", "ᾣ", "ᾦ", "ᾧ", "`", "᾿", "῾", "῍", "῎", "῏", "῟", "῞", "῝", "῍",
  270. "῎", "Ϝ", "ϝ", "Ϙ", "ϙ", "Ϡ", "ϡ"]
  271. ],
  272. "ara":[
  273. //{ "direction":"rtl", "lang":"ar", "class":"spanAr", "font-size":"1.25em" },
  274. ["؛", "؟", "ء", "آ", "أ", "ؤ", "إ", "ئ", "ا", "ب", "ة", "ت", "ث", "ج", "ح", "خ", "د", "ذ", "ر", "ز", "س", "ش", "ص",
  275. "ض", "ط", "ظ", "ع", "غ", "ف", "ق", "ك", "ل", "م", "ن", "ه", "و", "ى", "ي", "،"],
  276. ["پ", "چ", "ژ", "گ", "ڭ"]
  277. ],
  278. "DMG":[
  279. ["ʾ", "ʿ", "Ā", "ā", "Č", "č", "Ḍ", "ḍ", "Ḏ", "ḏ", "Ǧ", "ǧ", "Ġ", "ġ", "Ḥ", "ḥ", "Ḫ", "ḫ", "Ī", "ī", "ḷ", "ŋ", "Ṣ",
  280. "ṣ", "Š", "š", "Ṭ", "ṭ", "Ṯ", "ṯ", "Ū", "ū", "Ẓ", "ẓ", "Ẕ", "ẕ", "Ž", "ž"]
  281. ],
  282. "epo":[
  283. ["Ĉ", "ĉ", "Ĝ", "ĝ", "Ĥ", "ĥ", "Ĵ", "ĵ", "Ŝ", "ŝ", "Ŭ", "ŭ"]
  284. ],
  285. "est":[
  286. ["Č", "č", "Š", "š", "Ž", "ž", "Õ", "õ", "Ä", "ä", "Ö", "ö", "Ü", "ü"]
  287. ],
  288. "fra":[
  289. ["À", "à", "Â", "â", "Ç", "ç", "É", "é", "È", "è", "Ê", "ê", "Ë", "ë", "Î", "î", "Ï", "ï", "Ô", "ô", "Œ", "œ", "Ù", "ù", "Û", "û", "Ü", "ü", "Ÿ", "ÿ"],
  290. [ [[" "],"Espace insécable", "‗"], [[" :"],"Deux-points (double point) avec espace insécable", "‗:"], [[" ;"],"Point-virgule avec espace insécable", "‗;"], [[" !"],"Point d'exclamation avec espace insécable", "‗!"], [[" ?"],"Point d'interrogation avec espace insécable", "‗?"], [["« "," »"], "Guillemets français doubles (ou typographiques) avec espace insécable"], [["‹ "," ›"], "Guillemets français simples avec espace insécable"], [["“","”"], "Guillemets anglais doubles"], [["‘","’"], "Guillemets anglais simples"], ],
  291. [
  292. [[/(?:([‹«])( |\b)())|(?:()( |\b)([:;!?»›]))/g, "$1$4 $3$6"], 'ajouter ou remplacer espaces insécable avant :;?!»› et après ‹«', '‹«‗:;?!»›', 'replace'],
  293. ],
  294. ],
  295. "glg":[
  296. ["Á", "á", "À", "à", "Â", "â", "Ä", "ä", "É", "é", "È", "è", "Ê", "ê", "Ë", "ë", "Ì", "ì", "Î", "î", "Ï", "ï", "Ó", "ó", "Ò",
  297. "ò", "Ô", "ô", "Ö", "ö", "Ù", "ù", "Û", "û", "Ẁ", "ẁ", "Ŵ", "ŵ", "Ẅ", "ẅ", "Ý", "ý", "Ỳ", "ỳ", "Ŷ", "ŷ", "Ÿ", "ÿ"]
  298. ],
  299. "ell":[
  300. ["Α", "Ά", "Β", "Γ", "Δ", "Ε", "Έ", "Ζ", "Η", "Ή", "Θ", "Ι", "Ί", "Κ", "Λ", "Μ", "Ν", "Ξ", "Ο", "Ό", "Π", "Ρ", "Σ", "Τ", "Υ", "Ύ", "Φ", "Χ", "Ψ", "Ω", "Ώ"],
  301. ["α", "ά", "β", "γ", "δ", "ε", "έ", "ζ", "η", "ή", "θ", "ι", "ί", "κ", "λ", "μ", "ν", "ξ", "ο", "ό", "π", "ρ", "σ", "ς", "τ", "υ", "ύ", "φ", "χ", "ψ", "ω", "ώ"]
  302. ],
  303. "haw (Hawaiian)":[
  304. //{ "lang":"haw", "font-family":"'Arial Unicode MS','Lucida Sans Unicode','MS Mincho',Arial,sans-serif;" },
  305. ["Ā", "ā", "Ē", "ē", "Ī", "ī", "Ō", "ō", "Ū", "ū", "ʻ"]
  306. ],
  307. "isl":[
  308. ["Á", "á", "Ð", "ð", "É", "é", "Í", "í", "Ó", "ó", "Ú", "ú", "Ý", "ý", "Þ", "þ", "Æ", "æ", "Ö", "ö", "ǫ"]
  309. ],
  310. "ita":[
  311. ["Á", "á", "À", "à", "É", "é", "È", "è", "Í", "í", "Ì", "ì", "Ó", "ó", "Ò", "ò", "Ú", "ú", "Ù", "ù"]
  312. ],
  313. "yid":[
  314. //{ "lang":"yi", "direction":"rtl" },
  315. ["", "א", "אַ", "אָ", "ב", "בֿ", "ג", "ד", "ה", "ו", "וּ", "װ", "ױ", "ז", "זש", "ח", "ט", "י", "יִ", "ײ", "ײַ", "כ", "ך", "כּ",
  316. "ל", ["","ל"], "מ", "ם", "נ", "ן", "ס", "ע","ע", "פ", "פּ", "פֿ", "ף", "צ", "ץ", "ק", "ר", "ש", "שׂ", "תּ", "ת", "׳", "״", "־", ""]
  317. ],
  318. "hrv":[
  319. //{ "lang":"hbs" },
  320. ["Č", "č", "Ć", "ć", "Dž", "dž", "Đ", "đ", "Š", "š", "Ž", "ž"]
  321. ],
  322. "bos":[
  323. //{ "lang":"hbs" },
  324. ["Č", "č", "Ć", "ć", "Dž", "dž", "Đ", "đ", "Š", "š", "Ž", "ž"]
  325. ],
  326. "srp":[
  327. //{ "lang":"hbs" },
  328. ["Č", "č", "Ć", "ć", "Dž", "dž", "Đ", "đ", "Š", "š", "Ž", "ž"]
  329. ],
  330. "rus":[
  331. ["А", "Ә", "Б", "В", "Г", "Ґ", "Ѓ", "Ғ", "Д", "Ђ", "Е", "Є", "Ё", "Ж", "З", "Ѕ", "И", "І", "Ї", "İ", "Й", "Ӣ", "Ј", "К",
  332. "Ќ", "Қ", "Л", "Љ", "М", "Н", "Њ", "Ң", "О", "Ө", "П", "Р", "С", "Т", "Ћ", "У", "Ў", "Ӯ", "Ұ", "Ү", "Ф", "Х", "Ҳ", "Һ",
  333. "Ц", "Ч", "Ҷ", "Џ", "Ш", "Щ", "Ъ", "Ы", "Ь", "Э", "Ю", "Я"],
  334. ["а", "ә", "б", "в", "г", "ґ", "ѓ", "ғ", "д", "ђ", "е", "є", "ё", "ж", "з", "ѕ", "и", "і", "ї", "й", "ӣ", "ј", "к", "ќ", "қ",
  335. "л", "љ", "м", "н", "њ", "ң", "о", "ө", "п", "р", "с", "т", "ћ", "у", "ў", "ӯ", "ұ", "ү", "ф", "х", "ҳ", "һ", "ц", "ч", "ҷ",
  336. "џ", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я"]
  337. ],
  338. "Lettisch":[
  339. //{ "lang":"lv" },
  340. ["Ā", "Č", "Ē", "Ģ", "Ī", "Ķ", "Ļ", "Ņ", "Š", "Ū", "Ž"],
  341. ["ā", "č", "ē", "ģ", "ī", "ķ", "ļ", "ņ", "š", "ū", "ž"]
  342. ],
  343. "lit":[
  344. ["Ą", "Č", "Ę", "Ė", "Į", "Š", "Ų", "Ū", "Ž"],
  345. ["ą", "č", "ę", "ė", "į", "š", "ų", "ū", "ž"]
  346. ],
  347. "Maltesisch":[
  348. //{ "lang":"mt" },
  349. ["Ċ", "ċ", "Ġ", "ġ", "Ħ", "ħ", "Ż", "ż"]
  350. ],
  351. "Pinyin":[
  352. ["Á", "á", "À", "à", "Ǎ", "ǎ", "Ā", "ā", "É", "é", "È", "è", "Ě", "ě", "Ē", "ē", "Í", "í", "Ì", "ì", "Ǐ", "ǐ", "Ī", "ī", "Ó",
  353. "ó", "Ò", "ò", "Ǒ", "ǒ", "Ō", "ō", "Ú", "ú", "Ù", "ù", "Ü", "ü", "Ǔ", "ǔ", "Ū", "ū", "Ǘ", "ǘ", "Ǜ", "ǜ", "Ǚ", "ǚ", "Ǖ", "ǖ"]
  354. ],
  355. "pol":[
  356. //{ "lang":"pl" },
  357. ["ą", "Ą", "ć", "Ć", "ę", "Ę", "ł", "Ł", "ń", "Ń", "ó", "Ó", "ś", "Ś", "ź", "Ź", "ż", "Ż"]
  358. ],
  359. "por":[
  360. //{ "lang":"pt" },
  361. ["Á", "á", "À", "à", "Â", "â", "Ã", "ã", "Ç", "ç", "É", "é", "Ê", "ê", "Í", "í", "Ó", "ó", "Ô", "ô", "Õ", "õ", "Ú", "ú", "Ü", "ü"]
  362. ],
  363. "roa (Romance languages)":[
  364. ["Ā", "ā", "Ē", "ē", "Ī", "ī", "Ō", "ō", "Ū", "ū"]
  365. ],
  366. "ron":[
  367. ["Ă", "ă", "Â", "â", "Î", "î", "Ș", "ș", "Ț", "ț"]
  368. ],
  369. "Skandinavisch":[
  370. ["À", "à", "É", "é", "Å", "å", "Æ", "æ", "Ä", "ä", "Ø", "ø", "Ö", "ö"]
  371. ],
  372. "slk":[
  373. ["Á", "á", "Č", "č", "Ď", "ď", "É", "é", "Í", "í", "Ľ", "ľ", "Ň", "ň", "Ó", "ó", "Ô", "ô", "Ŕ", "ŕ", "Š", "š", "Ť", "ť", "Ú", "ú", "Ý", "ý", "Ž", "ž"]
  374. ],
  375. "wen (Sorbian languages)":[
  376. //Sorbisch
  377. ["Č", "č", "Ć", "ć", "ě", "Ł", "ł", "ń", "ó", "ř", "ŕ", "Š", "š", "Ś", "ś", "Ž", "ž", "Ź", "ź"]
  378. ],
  379. "spa":[
  380. ["Á", "á", "É", "é", "Í", "í", "Ñ", "ñ", "Ó", "ó", "Ú", "ú", "Ü", "ü", "¡", "¿"]
  381. ],
  382. "ces":[
  383. ["Á", "á", "Č", "č", "Ď", "ď", "É", "é", "Ě", "ě", "Í", "í", "Ň", "ň", "Ó", "ó", "Ř", "ř", "Š", "š", "Ť", "ť", "Ú", "ú", "Ů", "ů", "Ý", "ý", "Ž", "ž"]
  384. ],
  385. "tur":[
  386. ["Â", "Ə", "Ç", "Ğ", "Gʻ", "Î", "İ", "Ñ", "Ň", "Oʻ", "Ş", "Û", "Ý", "Ž"],
  387. ["â", "ə", "ç", "ğ", "gʻ", "î", "ı", "ñ", "ň", "oʻ", "ş", "û", "ý", "ž"]
  388. ],
  389. "hun":[
  390. ["á", "é", "í", "Ő", "ö", "ó", "ő", "Ű", "ú", "ü", "ű"]
  391. ],
  392. "vie":[
  393. ["À", "à", "Ả", "ả", "Á", "á", "Ạ", "ạ", "Ã", "ã", "Ă", "ă", "Ằ", "ằ", "Ẳ", "ẳ", "Ẵ", "ẵ", "Ắ", "ắ", "Ặ",
  394. "ặ", "Â", "â", "Ầ", "ầ", "Ẩ", "ẩ", "Ẫ", "ẫ", "Ấ", "ấ", "Ậ", "ậ", "Đ", "đ", "È", "è", "Ẻ", "ẻ", "Ẽ", "ẽ",
  395. "É", "é", "Ẹ", "ẹ", "Ê", "ê", "Ề", "ề", "Ể", "ể", "Ễ", "ễ", "Ế", "ế", "Ệ", "ệ", "Ỉ", "ỉ", "Ĩ", "ĩ", "Í",
  396. "í", "Ị", "ị", "Ì", "ì", "Ỏ", "ỏ", "Ó", "ó", "Ọ", "ọ", "Ò", "ò", "Õ", "õ", "Ô", "ô", "Ồ", "ồ", "Ổ", "ổ",
  397. "Ỗ", "ỗ", "Ố", "ố", "Ộ", "ộ", "Ơ", "ơ", "Ờ", "ờ", "Ở", "ở", "Ỡ", "ỡ", "Ớ", "ớ", "Ợ", "ợ", "Ù", "ù", "Ủ",
  398. "ủ", "Ũ", "ũ", "Ú", "ú", "Ụ", "ụ", "Ư", "ư", "Ừ", "ừ", "Ử", "ử", "Ữ", "ữ", "Ứ", "ứ", "Ự", "ự", "Ỳ", "ỳ",
  399. "Ỷ", "ỷ", "Ỹ", "ỹ", "Ỵ", "ỵ", "Ý", "ý"]
  400. ],
  401. "examples":[
  402. [ // <= That's the group (you need to have at least one group)
  403. "x", //<= single symbol, inserted before (just as typing it)
  404. ["x"], //<= single symbol, inserted before (shown as "x")
  405. ["x", "y"], //<= x inserted before, y inserted after (shown as "x…y")
  406. ["x", ""], //<= single symbol, inserted before (shown as "x…")
  407. ["", "y"], //<= nothing inserted before, y inserted after (shown as "…y")
  408. [["x", "y"], "title"], //<= x inserted before, y inserted after, with link-title
  409. [["x", "y"], "title", "text"], //<= x inserted before, y inserted after, with link-title and description
  410. [["x", "y"], "", "text"], //<= x inserted before, y inserted after, with description (empty titles are ignored)
  411. ],
  412. [ // <= another group (seperated by "•")
  413. [["‽"], "Interrobang"], [["⁂"],"Asterism"], [["〈","〉"],"Buchtitelzeichen (Chinesisch)"], [[""],""],
  414. ],
  415. ]
  416. };
  417. //only for debuging
  418. //$('.addTranslations').show();
  419. function addsymbols(){
  420. GM_log('addsymbols');
  421. if(!$(this).hasClass('symbol_insert_helper_active')){
  422. $(this).addClass('symbol_insert_helper_active');
  423. var addTranslations = $(this).find('.addTranslations');
  424.  
  425. var translatelink = $(this).find('.translateLink a');
  426. //chrome needs this:
  427. //translatelink.click(function(){addTranslations.show();});
  428. var cancelbutton = $(this).find('input[type="button"][id$="cancel"]');
  429. cancelbutton.click(function(){addTranslations.hide();});
  430. var detector = addTranslations.find('select');
  431. var textarea = addTranslations.find('textarea');
  432. var important = addTranslations.find('.important');
  433. important.css({'font-size': '90%'});
  434. var superbox = $('<div></div>').css({'line-height': '1.8em'});
  435. superbox.css({'word-spacing': '0.2em'});
  436. var select = $('<select></select>').css({'margin-right':'0.5em'});
  437. var more = $('<option value="default">&hellip;</option>');
  438. select.append(more);
  439. select.css({'width':'5em', 'border': '1px solid #CCCCCC', 'border-radius': '3px', 'background-image': '-webkit-gradient( linear, left top, left bottom, color-stop(0, rgb(245,245,245)), color-stop(0.7, rgb(255,255,255)) )', 'background-image': '-moz-linear-gradient( center top, rgb(245,245,245) 0%, rgb(255,255,255) 70% )'});
  440. var langnameselect = addTranslations.find('select.translationLang');
  441.  
  442. $.each(charinsert, function(index, value){
  443. var name = langnameselect.find('option[value="'+index+'"]').text();
  444. var option = $('<option value="'+index+'">'+(name ? name : index)+'</option>');
  445. select.append(option);
  446. });
  447. //$('select.translationLang').css({'border': '1px solid #CCCCCC', 'border-radius': '3px', 'background-image': '-webkit-gradient( linear, left bottom, left top, color-stop(0, #888888), color-stop(0.7, rgb(255,255,255)) )', 'background-image': '-moz-linear-gradient( center bottom, #888888 0%, rgb(255,255,255) 70% )'});
  448. //$('input[type="button"]').css({'border': '1px solid #CCCCCC', 'border-radius': '3px', 'background-image': '-webkit-gradient( linear, left bottom, left top, color-stop(0, #888888), color-stop(0.7, rgb(255,255,255)) )', 'background-image': '-moz-linear-gradient( center bottom, #888888 0%, rgb(255,255,255) 70% )'});
  449. var closebuttonlangs = $("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABhSURBVCjPY/jPgB8y0FHBkb37/+/6v+X/+v8r/y/ei0XB3v+H4HDWfywKtgAl1oLhof8TsClYA5SAgEP/27EpWIxkQj02BbOQ3FCGTcGEdV3/W4B6K/+X/M9fNzAhSbYCAMiTH3pTNa+FAAAAAElFTkSuQmCC'/>").css({'vertical-align': 'text-bottom', 'margin-left':'0.2em', 'cursor':'pointer', 'float': 'none'});
  450. var closebutton = $("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABbSURBVCjPzdAxDoAgEERRzsFp95JbGI2ASA2SCOX3Ahtr8tuXTDIO959bCxRfpOitWS5vA+lMJg9JbKCTTmMQ1QS3ThqVQbBBlsbgpXLYE8lHCXrqLptf9km7Dzv+FwGTaznIAAAAAElFTkSuQmCC'/>").css({'vertical-align': 'text-bottom', 'float': 'none'});
  451. var veryfirst = true;
  452. select.change(function(){
  453. var supergroupbox = $('<span class="supergroup"></span>').css({'border': '1px solid #CCCCCC', 'border-radius': '8px', 'padding-left': '0.5em', 'margin-left': '0.5em', 'background-image': '-webkit-gradient( linear, left top, left bottom, color-stop(0, rgb(245,245,245)), color-stop(0.7, rgb(255,255,255)) )', 'background-image': '-moz-linear-gradient( center top, rgb(245,245,245) 0%, rgb(255,255,255) 70% )'});
  454. var optval = $(this).find(':selected').val();
  455.  
  456. insertlength = $(charinsert[optval]).length;
  457. $(charinsert[optval]).each(function(groupindex, group){
  458. groupbox = $('<span class="group"></span>');
  459. grouplength = $(group).length;
  460. $(group).each(function(symbolindex, symbol){
  461. var before = '';
  462. var after = '';
  463. var posstart = 0;
  464. var posend = 0;
  465. var ellipse = '';
  466. var text = '';
  467. var title = '';
  468. var special = '';
  469. var beforelink = false;
  470. var afterlink = false;
  471. var bothlink = false;
  472. var linkspan = $('<span></span>');
  473.  
  474. if(typeof(symbol)=='string'){
  475. before = symbol;
  476. //text = symbol;
  477. beforelink = $('<a'+title+'>'+before+'</a>');
  478. }
  479. else{
  480. if(typeof(symbol[0])=='string'){
  481. before = symbol[0];
  482. after = (typeof(symbol[1])=='string' ? symbol[1] : '');
  483. ellipse = (typeof(symbol[1])=='string' ? '&hellip;' : '');
  484.  
  485. //text = before+ellipse+after;
  486. //link = $('<a'+title+'>'+text+'</a>');
  487. beforelink = $('<a'+title+'>'+before+'</a>');
  488. bothlink = $('<a'+title+'>&hellip;</a>');
  489. afterlink = $('<a'+title+'>'+after+'</a>');
  490. }
  491. else {
  492. before = symbol[0][0];
  493. after = (typeof(symbol[0][1])=='string' ? symbol[0][1] : '');
  494. ellipse = (typeof(symbol[0][1])=='string' ? '&hellip;' : '');
  495. text = (typeof(symbol[2])=='string' ? symbol[2] : '');
  496. special = (typeof(symbol[3])=='string' ? symbol[3] : '');
  497. title = ( (typeof(symbol[1])=='string' && symbol[1]!="") ? ' title="'+symbol[1]+'"' : '');
  498. //link = $('<a'+title+'>'+text+'</a>');
  499. beforelink = $('<a'+title+'>'+before+'</a>');
  500. if(typeof(symbol[0][1])=='string'){
  501. bothlink = $('<a'+title+'>&hellip;</a>');
  502. }
  503. if(text!=""){
  504. bothlink = $('<a'+title+'>'+text+'</a>');
  505. }
  506. afterlink = $('<a'+title+'>'+after+'</a>');
  507. }
  508. }
  509.  
  510. posstart = before.length;
  511. posend = before.length;
  512. if(beforelink && text==""){
  513. beforelink.click(function(e){
  514. if(e.ctrlKey) {
  515. bothlink.click();
  516. }
  517. else{
  518. value = textarea.val();
  519. start = textarea.getSelectionStart();
  520. end = textarea.getSelectionEnd();
  521. textarea.val( value.substr(0, start) + before + value.substr(start) )
  522. .setSelection(start+posstart, end+posend);
  523. }
  524. });
  525. linkspan.append(beforelink);
  526. }
  527. if(bothlink){
  528. if(special=="toUpperCase"){
  529. bothlink.click(function(e){
  530. value = textarea.val();
  531. start = textarea.getSelectionStart();
  532. end = textarea.getSelectionEnd();
  533. textarea.val( value.substr(0, start) + value.substr(start, end-start).toUpperCase() + value.substr(end) )
  534. .setSelection(start, end);
  535. });
  536. }
  537. else if(special=="toLowerCase"){
  538. bothlink.click(function(e){
  539. value = textarea.val();
  540. start = textarea.getSelectionStart();
  541. end = textarea.getSelectionEnd();
  542. textarea.val( value.substr(0, start) + value.substr(start, end-start).toLowerCase() + value.substr(end) )
  543. .setSelection(start, end);
  544. });
  545. }
  546. else if(special=="toTitleCase"){
  547. bothlink.click(function(e){
  548. value = textarea.val();
  549. start = textarea.getSelectionStart();
  550. end = textarea.getSelectionEnd();
  551. textarea.val( value.substr(0, start) + value.substr(start, 1).toUpperCase() + value.substr(start+1, end-start-1) + value.substr(end) )
  552. .setSelection(start, end);
  553. });
  554. }
  555. else if(special=="replace"){
  556. bothlink.click(function(e){
  557. value = textarea.val();
  558. start = textarea.getSelectionStart();
  559. end = textarea.getSelectionEnd();
  560. var replace = value.substr(start, end-start).replace(before, after);
  561. textarea.val( value.substr(0, start) + replace + value.substr(end) )
  562. .setSelection(start, end+replace.length-(end-start));
  563. });
  564. }
  565. else {
  566. bothlink.click(function(e){
  567. value = textarea.val();
  568. start = textarea.getSelectionStart();
  569. end = textarea.getSelectionEnd();
  570. textarea.val( value.substr(0, start) + before + value.substr(start, end-start) + after + value.substr(end) )
  571. .setSelection(start+posstart, end+posend);
  572. });
  573. }
  574. linkspan.append(bothlink);
  575. }
  576. if(afterlink && text==""){
  577. afterlink.click(function(e){
  578. if(e.ctrlKey) {
  579. bothlink.click();
  580. }
  581. else{
  582. value = textarea.val();
  583. start = textarea.getSelectionStart();
  584. end = textarea.getSelectionEnd();
  585. textarea.val( value.substr(0, start) + value.substr(start, end-start) + after + value.substr(end) )
  586. .setSelection(start, end);
  587. }
  588. });
  589. linkspan.append(afterlink);
  590. }
  591. groupbox.append(linkspan);
  592. if(symbolindex+1<grouplength){
  593. groupbox.append(' ');
  594. } else if(groupindex+1<insertlength)
  595. {
  596. groupbox.append(closebutton.clone());
  597. }
  598. });
  599. supergroupbox.append(groupbox);
  600. superbox.append(supergroupbox);
  601. select.find('option[value="default"]').attr('selected', 'selected');
  602. select.find('option[value="'+optval+'"]').hide();
  603. });
  604. var name = langnameselect.find('option[value="'+optval+'"]').text();
  605. supergroupbox.append(closebuttonlangs.clone().attr('title', (name!="" ? name : optval)).click(function(){
  606. select.find('option[value="'+optval+'"]').show();supergroupbox.hide('slow').remove();
  607. if(setup){
  608. keysets = (typeof(keysets)=='string' ? keysets : keysets.join(','));
  609. keysets = (keysets+'').replace(optval, '');
  610. keysets = (keysets+'').replace(/,+/g, ',').replace(/^,/g, '').split(',').unique().join(',');
  611. GM_setValue('keysets',keysets);
  612. GM_log('keysets: '+keysets);
  613. $('#keysets').val(keysets);
  614. }
  615. }));
  616. if(setup){
  617. keysets = (typeof(keysets)=='string' ? keysets : keysets.join(','));
  618. keysets += ','+optval;
  619. keysets = (keysets+'').replace(/,+/g, ',').replace(/^,/g, '').split(',').unique().join(',');
  620. GM_setValue('keysets',keysets);
  621. GM_log('keysets: '+keysets);
  622. $('#keysets').val(keysets);
  623. }
  624. });
  625. superbox.append(select);
  626. //add all keysets defined by the user
  627. $(keysets).each(function(langindex, lang){
  628. if(charinsert[lang])
  629. {
  630. select.find(':selected').removeAttr('selected');
  631. select.find('option[value="'+lang+'"]').attr('selected', 'selected');
  632. select.change();
  633. }
  634. });
  635. //add the keyset for the lang of the interface (selected in the top right corner)
  636. //but only if the user specified so via "facekey" true
  637. if(facekey && !setup){
  638. select.find(':selected').removeAttr('selected');
  639. select.find('option[value="'+facelang+'"]').attr('selected', 'selected');
  640. select.change();
  641. }
  642. //add the keyset for the lang that the user selected as the sentences' language instead of "automatic recognition"
  643. //but only if the user specified so via "autokey" true
  644. if(autokey){
  645. langnameselect.change(function(){
  646. var lang = $(this).find(':selected').val();
  647. if(charinsert[lang])
  648. {
  649. select.find(':selected').removeAttr('selected');
  650. select.find('option[value="'+lang+'"]').attr('selected', 'selected');
  651. select.change();
  652. }
  653. });
  654. }
  655. important.before(superbox);
  656. }
  657. }
  658. //$('.sentences_set').live("mouseover", addsymbols);
  659. $('.sentences_set').each(addsymbols);
  660. $('a#showRandom').after($('<a title="Tatoeba Symbol Insert Helper"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIMSURBVDjLY/j//z8DJZiBZgY4tN9wcO6+0erZd2uKc+fNfoeWGxMcW27Msiq+3GWUdIZXL/okI14D7JqvB+csf3Rv4p6X//t3Pf/fvf35/8Ilj3471V3bph9zmougC6xrr8mETbu7q3jl40/FKx5+LVzy8Ltd+eUZBvGnOYjygk3llfKCZY++u3fcWutcd21B07on/61yz88kKgwsCi8qJc++9yhu2p37ppnnQ4C4oWblo/9WOReXEjTANOsCs1PD9VVZ8+9/N0k7m6Yfe5LLOPFMR+Wyh/9dqq5eUvc6xIbXALOs8zEZc+9/C+q+ddEw/rSfXuRxLfP0swuqgAYEt934pOq2nxenAUbJZ0TjJt9+Vbn80X+v5huXrbLOb7LMOLfVterqjYp5C/7nTo7/n9bn/z+yxeGTZ4VeDYoBBrGnGe1LLs8G+dU87QxKYIXUNt9oXJ34f8uVqf8vPNv1v3931v/wft3/5tmSPWAF+jGnuIDR41K65OH/iJ5bb3SCjtnCNKu47heOaXP7vfHyhP8br036DwI9e1L/9+9JBxnwHRLqGefWxfbf+pcw4fb/gObrb7UDjvQqO+0VULLfo6Xte3iRT7Xh/21X5vxHBpsuTQUZQFx6t8yR/t69K+l/+64EsOb2nQmoLiCEgQpbgns0/vfuSgHbDKJBfHgYEGlIBxB/AjkbSneAxAHhJKUiPzK8ogAAAABJRU5ErkJggg==" alt="Tatoeba Symbol Insert Helper"/></a>').css({'vertical-align': 'sub'}).click(function(){$('.random_sentences_set .sentences_set').each(addsymbols);}));
  661. }
  662. }