User:Wikitiki89/common.js

/* // Fix Hebrew vowel point ordering $(function {    jQuery('.Hebr').each(function (index, element) { if (/[\u0591-\u05C4][\u05BC\u05C1\u05C2]/.test(element.innerHTML)) { element.innerHTML = element.innerHTML.replace(               /([\u0591-\u05C4]+)\u05C1/g, '&#x5C1;$1'            ).replace(                /([\u0591-\u05C4]+)\u05C2/g, '&#x5C2;$1'            ).replace(                /([\u0591-\u05C4]+)\u05BC/g, '&#x5BC;$1'            ); }   }); });

// Editable title $(function {   if ($('#firstHeading').text.replace(/ /g, "_") == mw.config.values.wgPageName) {        $("#firstHeading").prop("contenteditable", "true");        $('#firstHeading').keypress(function (e) { if (e.which == 13) { window.location = "https://en.wiktionary.org/w/index.php?search=" + $('#firstHeading').text + "&title=Special%3ASearch&go=Go"; return false; }       });    } });

// Load title into search bar $(function {   if (mw.config.values.wgPageName != "Special:Search" && mw.config.values.wgPageName != "Wiktionary:Main_Page") {        $("#searchInput").val(mw.config.values.wgRelevantPageName.replace(/_/g, " "));    } });

// Disable keyboard shortcuts $('[accesskey]').attr('accesskey',null);

/*

Ruakh's Tbot-like JavaScript for translations
*/

// broken for some reason /* importScript('User:Ruakh/Tbot.js');

$(function { Tbot.greenifyTranslinks('ru'); }); $(function { Tbot.greenifyTranslinks('he'); }); $(function { Tbot.greenifyTranslinks('yi'); }); $(function { Tbot.greenifyTranslinks('ar'); });