//this code will add a button to the left. This button loads a tool on
//the toolserver that checks whether there are pages with the same name
//on other wiktionaries
document.write('<script type="text/javascript" src="'
+ 'http://ro.wiktionary.orghttps://ro.wiktionary.org/w/index.php?title=User:Annabel/Interwiki.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function doQajutor() {
document.editform.wpTextbox1.value = '{' + '{' + 'Ajutor|}}'+'\n\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = 'Marcat pentru ajutor';
document.editform.wpMinoredit.checked = true;
document.editform.submit();
}
function doQbunVenit() {
document.editform.wpTextbox1.value = '{' + '{' + 'subst:bunvenit}}'+'~~'+'~~' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = 'bv';
document.editform.wpMinoredit.checked = true;
document.editform.wpWatchthis.checked = false;
document.editform.submit();
}
function addQajutor() {
addTab("javascript:doQajutor()", "A", "ca-ajutor", "Marchează pentru ajutor", "");
akeytt();
}
function addQbunVenit() {
addTab("javascript:doQbunVenit()", "BV", "ca-bunVenit", "Urează bun venit", "");
akeytt();
}
$(function() {
if (document.title.indexOf("Discuție Utilizator:") != -1) {
addOnloadHook(addQbunVenit);
}
if (document.title.indexOf("Utilizator:") != -1) {
return;
}
if (document.title.indexOf("modificare ") != -1) {
addOnloadHook(addQajutor);
}
});
function addlilink(tabs, url, name, id, title, key){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id)
{
if(key && title)
{
ta = ;
}
else if(key)
{
ta = ;
}
else if(title)
{
ta = ;
}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
return addlilink(tabs, url, name, id, title, key)
};