User:Viki2/edit.js

From Wikipedia

< User:Viki2

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror:: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.

// <pre><nowiki>

function Ekle(ek, ozet, yer) {
  if (ek == "interwiki") {
    var pageTitle = document.title.split(" - ")[0];
    var pagename = document.title.substr(pageTitle.indexOf('"')+1, pageTitle.lastIndexOf('"')-1);
    var ek="[[en:"+pagename+"]]";
    if(document.editform.wpTextbox1.value.indexOf("[[en:")!=-1) return;
  }

  alert(yer);

  if (yer == "t")  document.editform.wpTextbox1.value = ek + "\n\n" + document.editform.wpTextbox1.value ;
  else if (yer == "a")  document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n" + ek ;

  document.editform.wpSummary.value = ozet;
//  document.editform.wpMinoredit.checked = true;
  document.editform.submit();
}

function addKmesaj() {
  addTab("javascript:Ekle('{{subst:Hoş geldin}}','Hoş geldin','t')", "hoş geldin", "ca-hg", "Hoş geldin mesajı","");
  akeytt();
}

if (document.title.indexOf("Editing ") != -1 ) {
  if (document.title.indexOf("User talk:") != -1 ) {
    if (window.addEventListener) window.addEventListener("load", addKmesaj, false);
    else if (window.attachEvent) window.attachEvent("onload", addKmesaj);
  }
  else if (document.title.indexOf("Resim:") != -1 ) {
    if (window.addEventListener) window.addEventListener("load", addRmesaj, false);
    else if (window.attachEvent) window.attachEvent("onload", addRmesaj);
  }
  else {
    if (document.title.indexOf("tartışma:") == -1 && document.title.indexOf("Kullanıcı:") == -1 ) {
      if (window.addEventListener) window.addEventListener("load", addMmesaj, false);
      else if (window.attachEvent) window.attachEvent("onload", addMmesaj);
    }
  }
}
 
// </nowiki></pre>
Navigation