User:Flyax/sidebar.js

function shortcutsInit {

shortcutsStartSection ('My Tools');

// κλεμμένο από το User:Connel MacKenzei/sidebar.js στο enwikt και ακολούθως από τη σελίδα του Ariel Glenn

// get page title //var pagetitle = document.getElementById('content').getElementsByTagName('h1').item(0).firstChild.nodeValue; var pagetitle = wgTitle; if (pagetitle.search(/Αναζήτηση/) != -1) { pagetitle = document.getElementById('searchText').value; } pagetitle = pagetitle.replace(/^Editing /g,""); pagetitle = pagetitle.replace(/\ \(section\)$/g,""); pagetitle = pagetitle.replace(/^\ /g, ""); var pageexternal = pagetitle.replace(/\ /g, "_"); var pageext =     pagetitle.replace(/\ /g, "+");

// end stolen bit

if ( pagetitle.search(/:/) != -1 ) { shortcutsAddLink ('Etym dict','http://www.etymonline.com/index.php'); shortcutsAddLink ('in.gr-2','http://lexicon.pathfinder.gr/index.php?lookup='); } else { shortcutsAddLink ('Etym dict','http://www.etymonline.com/index.php?search='+pageext+'&searchmode=none'); var word=pageext;

word=word.replace(/α/g,"%e1"); word=word.replace(/β/g,"%e2"); word=word.replace(/γ/g,"%e3"); word=word.replace(/δ/g,"%e4"); word=word.replace(/ε/g,"%e5"); word=word.replace(/ζ/g,"%e6"); word=word.replace(/η/g,"%e7"); word=word.replace(/θ/g,"%e8"); word=word.replace(/ι/g,"%e9"); word=word.replace(/κ/g,"%ea"); word=word.replace(/λ/g,"%eb"); word=word.replace(/μ/g,"%ec"); word=word.replace(/ν/g,"%ed"); word=word.replace(/ξ/g,"%ee"); word=word.replace(/ο/g,"%ef"); word=word.replace(/π/g,"%f0"); word=word.replace(/ρ/g,"%f1"); word=word.replace(/σ/g,"%f3"); word=word.replace(/τ/g,"%f4"); word=word.replace(/υ/g,"%f5"); word=word.replace(/φ/g,"%f6"); word=word.replace(/χ/g,"%f7"); word=word.replace(/ψ/g,"%f8"); word=word.replace(/ω/g,"%f9"); word=word.replace(/ς/g,"%f2"); word=word.replace(/ά/g,"%dc"); word=word.replace(/έ/g,"%dd"); word=word.replace(/ή/g,"%de"); word=word.replace(/ί/g,"%df"); word=word.replace(/ό/g,"%fc"); word=word.replace(/ύ/g,"%fd"); word=word.replace(/ώ/g,"%fe"); word=word.replace(/ϊ/g,"%fa"); word=word.replace(/ϋ/g,"%fb"); word=word.replace(/ΐ/g,"%c0"); word=word.replace(/ΰ/g,"%e0"); word=word.replace(/Α/g,"%c1"); word=word.replace(/Β/g,"%c2"); word=word.replace(/Γ/g,"%c3"); word=word.replace(/Δ/g,"%c4"); word=word.replace(/Ε/g,"%c5"); word=word.replace(/Ζ/g,"%c6"); word=word.replace(/Η/g,"%c7"); word=word.replace(/Θ/g,"%c8"); word=word.replace(/Ι/g,"%c9"); word=word.replace(/Κ/g,"%ca"); word=word.replace(/Λ/g,"%cb"); word=word.replace(/Μ/g,"%cc"); word=word.replace(/Ν/g,"%cd"); word=word.replace(/Ξ/g,"%ce"); word=word.replace(/Ο/g,"%cf"); word=word.replace(/Π/g,"%d0"); word=word.replace(/Ρ/g,"%d1"); word=word.replace(/Σ/g,"%d3"); word=word.replace(/Τ/g,"%d4"); word=word.replace(/Υ/g,"%d5"); word=word.replace(/Φ/g,"%d6"); word=word.replace(/Χ/g,"%d7"); word=word.replace(/Ψ/g,"%d8"); word=word.replace(/Ω/g,"%d9"); word=word.replace(/Ά/g,"%b6"); word=word.replace(/Έ/g,"%b8"); word=word.replace(/Ή/g,"%b9"); word=word.replace(/Ί/g,"%ba"); word=word.replace(/Ό/g,"%bc"); word=word.replace(/Ύ/g,"%be"); word=word.replace(/Ώ/g,"%bf"); word=word.replace(/Ϊ/g,"%da"); word=word.replace(/Ϋ/g,"%db");

shortcutsAddLink ('in.gr','http://dictionary.in.gr/?searchText='+pageext); shortcutsAddLink ('in.gr-2','http://lexicon.pathfinder.gr/index.php?lookup='+pageext); shortcutsAddLink ('ΛΚΝ','http://www.greek-language.gr/greekLang/modern_greek/tools/lexica/triantafyllides/search.html?lq='+pageext); shortcutsAddLink ('elwikt','http://el.wiktionary.org/wiki/'+pageexternal); } shortcutsAddLink ('Αργκό','http://www.slang.gr/'); }