User:Aotake/interlang.js

// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission.

function interlang_title { var e, i, s; if(!(e = document.getElementById('p-lang'))) return; e = e.getElementsByTagName('a'); for(i = 0; i < e.length; ++i) { s = e[i].href.replace(/^http:\/\/([^\.]+)[^\/]+\/wiki\//, '$1:'); e[i].setAttribute('title', decodeURI(s.replace(/_/g, ' '))); } } $(interlang_title);