Kullanıcı:Ugur Basak/yardımcı.js

Not: Sayfayı kaydettikten sonra değişiklikleri görebilmek için tarayıcınızın önbelleğinizi temizlemeniz gerekir. Google Chrome, Firefox, Microsoft Edge ve Safari: ⇧ Shift tuşuna basılı tutun ve Yeniden Yükle araç çubuğu düğmesine tıklayın. Ayrıntılar ve diğer tarayıcılara yönelik yönergeler için Vikipedi:Önbelleğinizi atlayın sayfasını inceleyin.
// by [[:en:User:Raylu|raylu]]
// modified [[User:Ugur Basak|Ugur Basak]]
// </nowiki></pre>

// <pre><nowiki>

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[id] = [key, title];
        }
        else if(key)
        {
            ta[id] = [key, ''];
        }
        else if(title)
        {
            ta[id] = ['', title];
        }
    }
    // re-render the title and accesskeys from existing code in wikibits.js
    akeytt();
    return li;
}

// </nowiki></pre>

// <pre><nowiki>
function addTab(url, name, id, title, key){
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    return addlilink(tabs, url, name, id, title, key);
}

function addTabBelow(url, name, id, title, key){
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
alert(tabs.length);
if(tabs.length == 1)
    {
      var actions = document.getElementById('p-cactions');
      var ul = document.createElement('ul');
      actions.appendChild(ul);

    var na = document.createElement('a');
    na.href = "[[Vikipedi:Hızlı silme]]";
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.id = "VP HS";
    li.appendChild(na);
var tabs0 = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    var br = document.createElement('br');
    tabs0.appendChild(br);
      akeytt();
    }
tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
alert(tabs.length);
      var tabBelow = document.getElementById('p-cactions').getElementsByTagName('ul')[1];
alert(tabBelow);
    return addlilink(tabBelow, url, name, id, title, key);  
}
// </nowiki></pre>