Kullanıcı:Selkem/monobook.js

Vikipedi, özgür ansiklopedi

Not: Ayarlarınızı kaydettikten sonra, tarayıcınızın belleğini de temizlemeniz gerekmektedir: Mozilla / Firefox / Safari: Shift e basılıyken safyayı yeniden yükleyerek veya Ctrl-Shift-R yaparak (Apple Mac için Cmd-Shift-R);, IE: Ctrl-F5, Konqueror: Sadece sayfayı yeniden yükle tuşuna basarak.

// [[User:Lupin/popups.js]] - please include this line 

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

popupAdminLinks=true;
popupFixDabs=true;

// <pre><nowiki>
// If you are editing a page, click the wikify button on your tab bar to add "{{wikify}}" to the top, set "Marked for wikification." as the edit summary, mark it as a minor edit, and submit.

function doQwikify() {
  if(document.editform.wpTextbox1.value.indexOf("{{düzenle}}")==-1 && document.editform.wpTextbox1.value.indexOf("{{Düzenle}}")==-1)
  {
    document.editform.wpTextbox1.value = "{{düzenle-tarih|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}\n\n" + document.editform.wpTextbox1.value;
    document.editform.wpSummary.value = "düzenleme yapılmalı";
  }
  else
  {
    document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace("{{düzenle}}","{{düzenle-tarih|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}");
    document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace("{{Düzenle}}","{{düzenle-tarih|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}");
    document.editform.wpSummary.value = "düzenle -> düzenle tarih";
  }
  document.editform.wpMinoredit.checked = true;
  document.editform.submit();
}
function addQwikify() {
  addTab("javascript:doQwikify()", "düzenle", "ca-wikify", "düzenleme yapılması için işaretle", "");
  akeytt();
}

//alert(document.title);

if (document.title.indexOf(" değiştirmektesiniz") != -1  && document.title.indexOf("Kullanıcı:") == -1 && document.title.indexOf("Kullanıcı mesaj:") == -1 ) {
  if (window.addEventListener) window.addEventListener("load", addQwikify, false);
  else if (window.attachEvent) window.attachEvent("onload", addQwikify);
}

// 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);
}
// </nowiki></pre>

// <pre><nowiki>

// This will add an [edit top] link at the top of all pages except preview pages
// by User:Pile0nades


// Add an [edit top] link to pages
addOnloadHook(function () {
  // if this is preview page or generated page, stop
  if(document.getElementById("wikiPreview") || window.location.href.indexOf("/wiki/Special:") != -1) return;

  // get the page title
  var pageTitle = document.title.split(" - ")[0].replace(" ", "_"); 

  // create div and set innerHTML to link
  var divContainer = document.createElement("div");
  divContainer.innerHTML = '<div class="editsection" style="float:right;margin-left:5px;margin-right:15px;margin-top:3px;">[<a href="/w/index.php?title='+pageTitle+'&action=edit&section=0" title="'+document.title.split(" - ")[0]+'">edit top</a>]</div>';

  // insert divContainer into the DOM before the h1
  if(window.location.href.indexOf("&action=edit") == -1)
    document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);

  if(window.location.href.indexOf("&action=edit&section=0") != -1)
    document.getElementById("wpSummary").value = "/* Giriş */ ";
});

// </nowiki></pre>

// <pre><nowiki>
 //Please leave the following line
 //[[user:Where/usertabs]]
 
 addOnloadHook(function() {
   if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history
      return;
   }
   if (document.title.indexOf("Kullanıcı:") == 0 || document.title.indexOf("Kullanıcı mesaj:") == 0) {
      username_a = document.URL.match(/:.*:(.*)/);
      username=username_a[1];
//      addTab("http://tr.wikipedia.org/wiki/Special:Contributions/" + username, "katkı", //"ca-contrib", "katkıları", "");
      addTab("http://tr.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "taşıma", "ca-pagemoves", "sayfa taşımaları", "");
//      addTab("http://tr.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=" + //username, "engel", "ca-blog", "erişim engelleme kayıtları", "");
      addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user="+ username+ "&dbname=trwiki_p", "interiot", "ca-interiot", "interiot değişiklik sayısı", "");
   }
 });
// </nowiki></pre>


/* <pre><nowiki> */

function addForceSummary()
{
    if(!/&action=edit/.test(window.location.href) && !/&action=submit/.test(window.location.href)) return;
    if(/&section=new/.test(window.location.href)) return;
    if(!document.forms.editform) return;
    document.forms.editform.wpSave.onclick = forceSummary;
}

function forceSummary()
{
    if(!document.forms.editform.wpSummary.value.replace(/^(?:\/\\*.*\\*\/)? *(.*) *$/,'$1'))
    {
        var r = prompt('Değişiklik özeti yazmadan devam etmek istediğinize emin misiniz?\nÖzet eklemek için, aşağıdaki kutuya özet yazabilirsiniz:',document.forms.editform.wpSummary.value);
        if(r == null) { return false; }
        document.forms.editform.wpSummary.value = r;
    }
    return true;
}

addOnloadHook(addForceSummary);

/* </nowiki></pre> */

// <pre><nowiki>
// If you are editing a page, click the wikify button on your tab bar to add "{{wikify}}" to the top, set "Marked for wikification." as the edit summary, mark it as a minor edit, and submit.

function doInterwiki() {
  var pageTitle = document.title.split(" - ")[0];
  var pagename = document.title.substr(pageTitle.indexOf('"')+1, pageTitle.lastIndexOf('"')-1);
  var str_interwiki="[[en:"+pagename+"]]";
  if(document.editform.wpTextbox1.value.indexOf("[[en:")==-1)
  {
   document.editform.wpTextbox1.value = document.editform.wpTextbox1.value+"\n"+str_interwiki;
   document.editform.wpSummary.value = "interwiki "+str_interwiki;
   document.editform.wpMinoredit.checked = true;
   document.editform.submit();
  }
}
function addInterwiki() {
  addTab("javascript:doInterwiki()", "interwiki", "ca-interwiki", "interwiki", "");
  akeytt();
}

//alert(document.title);

if (document.title.indexOf(" değiştirmektesiniz") != -1 && document.title.indexOf("Kullanıcı:") == -1 && document.title.indexOf("Kullanıcı mesaj:") == -1 ) {
  if (window.addEventListener) window.addEventListener("load", addInterwiki, false);
  else if (window.attachEvent) window.attachEvent("onload", addInterwiki);
}

// </nowiki></pre>

/* <pre><nowiki> */
function doDelete(reason) {
  document.forms.deleteconfirm.wpReason.value = reason;
  document.forms.deleteconfirm.submit();
}
function addDelete() {

addTab("javascript:doDelete('[[VP:HS]]#Genel 1 : Hiçbir anlam içermeyen içerikli sayfalar silinebilir')", "G1", "ca-genel1", "Hiçbir anlam içermeyen içerikli sayfalar silinebilir. nafnşew359cşs.ndc30", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 2 : Deneme yapılmış sayfalar silinebilir.')", "G2", "ca-genel2", "Deneme yapılmış sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 7 : Silinmiş maddelerin tartışma sayfaları silinebilir.')", "G7", "ca-genel7", "Silinmiş maddelerin tartışma sayfaları silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 1 : Bilgi taşımayan kısa içerikli sayfalar silinebilir.')", "M1", "ca-madde1", "Bilgi taşımayan kısa içerikli sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 3 : İçeriğe sahip olmayan maddeler silinebilir.')", "M3", "ca-madde3", "İçeriğe sahip olmayan maddeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 7 : Ciddi telif ihlali yaratan sayfalar silinebilir.')", "M7", "ca-madde7", "Ciddi telif ihlali yaratan sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 3 : Vandalizm yapılmış sayfalar silinebilir.')", "G3", "ca-genel3", "Vandalizm yapılmış sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 4 : Daha önce silinmiş bir içeriğin kopyası ise silinebilir.')", "G4", "ca-genel4", "Daha önce silinmiş bir içeriğin kopyası ise silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 5 : Engellenmiş kullanıcının olusturduğu sayfalar silinebilir.')", "G5", "ca-genel5", "Engellenmiş kullanıcının olusturduğu sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 6 : Yazarın talebi ile silinebilir.')", "G6", "ca-genel6", "Yazarın talebi ile silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Genel 8 : Ad değiştirirken silinebilir.')", "G8", "ca-genel8", "Ad değiştirirken silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 2 : Bir başka Wikimedia projesinde mevcut olan, yabancı dildeki maddeler silinebilir.')", "M2", "ca-madde2", "Bir başka Wikimedia projesinde mevcut olan, yabancı dildeki maddeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 4 : Transwikilenmiş (wiki projeleri arasında transfer edilmiş) maddeler silinebilir.')", "M4", "ca-madde4", "Transwikilenmiş maddeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 5 : Sadece saldırı içeren maddeler silinebilir.')", "M5", "ca-madde5", "Sadece saldırı içeren maddeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 6 : Ansiklopedik olmayan kişi veya gruplar ile ilgili sayfalar silinebilir.')", "M6", "ca-madde6", "Ansiklopedik olmayan kişi veya gruplar ile ilgili sayfalar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Madde 8 : Düzen ve ansiklopediklik açısından uygunsuz maddeler, belirtilen kriterlere uyuyorsa silinebilir.')", "M8", "ca-madde8", "Düzen ve ansiklopediklik açısından uygunsuz maddeler, belirtilen kriterlere uyuyorsa silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Yönlendirmeler 1 : Var olmayan sayfalara olan yönlendirmeler silinebilir.')", "Y1", "ca-yon1", "Var olmayan sayfalara olan yönlendirmeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Yönlendirmeler 2 : Büyük bir yazım hatası içeren yeni oluşturulmuş yönlendirmeler silinebilir.')", "Y2", "ca-yon2", "Büyük bir yazım hatası içeren yeni oluşturulmuş yönlendirmeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Yönlendirmeler 3 : Maddeden kullanıcı sayfasına olan yönlendirmeler silinebilir.')", "Y3", "ca-yon3", "Maddeden kullanıcı sayfasına olan yönlendirmeler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Resim/Medya 1 : Çift kopya resimlerden birisi silinebilir.')", "RM1", "ca-rm1", "Çift kopya resimlerden birisi silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Resim/Medya 2 : Bozuk veya boş resimler silinebilir.')", "RM2", "ca-rm2", "Bozuk veya boş resimler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Resim/Medya 3 : Lisans sorunu yaratanlar silinebilir.')", "RM3", "ca-rm3", "Lisans sorunu yaratanlar silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Kategoriler 1 : Boş kategoriler silinebilir.')", "K1", "ca-kat1", "Boş kategoriler silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Kategoriler 2 : Hızlı yeniden adlandırma kategorileri silinebilir.')", "K2", "ca-kat2", "Hızlı yeniden adlandırma kategorileri silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Kategoriler 3 : Şablon kategorileri silinebilir.')", "K3", "ca-kat3", "Şablon kategorileri silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Kullanıcı Sayfaları 1 : Kullanıcın isteği üzerine silinebilir.')", "KU1", "ca-kul1", "Kullanıcın isteği üzerine silinebilir.", "");

addTab("javascript:doDelete('[[VP:HS]]#Kullanıcı Sayfaları 2 : IP kullanıcıların sayfaları silinebilir.')", "KU2", "ca-kul2", "IP kullanıcıların sayfaları silinebilir.", "");

  akeytt();
}

//alert(document.title);

if (document.title.indexOf("Silme işlemini onayla") != -1) {
  if (window.addEventListener) window.addEventListener("load", addDelete, false);
  else if (window.attachEvent) window.attachEvent("onload", addDelete);
}
/* </nowiki></pre> */

// <pre><nowiki>

function doWelcome() {
  document.editform.wpTextbox1.value = "{{subst:hoşgeldin}} --~~~~";
  document.editform.wpSummary.value = "Vikipedi'ye hoşgeldin";
  document.editform.wpWatchthis.checked = false;
  document.editform.submit();
}
function addWelcome() {
  addTab("javascript:doWelcome()", "hoşgeldin", "ca-welcome", "hoşgeldin", "");
  akeytt();
}

//alert(document.title);

if (document.title.indexOf(" değiştirmektesiniz") != -1 && document.title.indexOf("Kullanıcı mesaj:") != -1 ) {
  if (window.addEventListener) window.addEventListener("load", addWelcome, false);
  else if (window.attachEvent) window.attachEvent("onload", addWelcome);
}

// </nowiki></pre>