User:Dbl2010/monobook.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// <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;
}
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
return addlilink(tabs, url, name, id, title, key);
}
//*************** sayıcı ******************
addOnloadHook(function() {
if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history
return;
}
if (document.title.indexOf("User:") == 0 || document.title.indexOf("User_talk:") == 0) {
username_a = document.URL.match(/:.*:(.*)/);
username=username_a[1];
addTab("http://meta.wikimedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "taşıma", "ca-pagemoves", "sayfa taşımaları", "");
addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user="+ username+ "&dbname=metawiki_p", "Sayı", "ca-interiot", "interiot değişiklik sayısı", "");
}
});
//************************************************
function doDelete(reason) {
document.forms.deleteconfirm.wpReason.value = reason;
document.forms.deleteconfirm.submit();
}
function addDelete() {
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 1]]: No meaningful')", "G1", "ca-genel1", "No meaningful content or history. This includes tests, obvious nonsense, corrupt images, legitimately blanked pages, or simple vandalism.", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 2]]: Reposted content')", "G2", "ca-genel2", "previously deleted ", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 3]]: Banned contributor')", "G4", "ca-genel3", "content created and edited solely by a banned user after they were banned", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 6]]: Authors request')", "G6", "ca-genel6", "Authors request", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 7]]: irrelevant')", "G7", "ca-genel7", "irrelevant to the Wikimedia Foundation, unless they have a known and definable historical context.", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Images|SD Images 1]]: Copy-Vio')", "I1", "ca-image1", "Noncommercial or by-permission-only images", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Images|SD Images 2]]: Orphaned')", "I2", "ca-image2", "Orphaned images placed in Category:Images with unknown source for at least a week", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Miscellaneous|SD Miscellaneous 1]]: Trivial')", "M1", "ca-misc1", "highly unlikely to be controversial (such as in preparation for a page move or history merge)", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Miscellaneous|SD Miscellaneous 2]]: Unneeded or broken redirect')", "M2", "ca-misc2", "Unneeded or broken redirects that do not have a serious edit history", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Miscellaneous|SD Miscellaneous 3]]: Unneeded talk')", "M3", "ca-misc3", "Unneeded talk: a discussion page for deleted or inexistant content", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Miscellaneous|SD Miscellaneous 4]]: Empty Category')", "M4", "ca-misc4", "Categories empty for at least a week", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 4]]: Redundant')", "G4", "ca-genel4", "A page that is identical to another", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#General|SD General 5]]: Copy-Vio')", "G5", "ca-genel5", "copyright violation", "");
addTab("javascript:doDelete('[[Meta:Deletion_policy#Articles|SD Articles 1]]: transwikied')", "A1", "ca-article1", "transwikied", "");
akeytt();
}
if (document.title.indexOf("Confirm delete") != -1 || document.title.indexOf("Silme işlemini onayla") != -1) {
if (window.addEventListener) window.addEventListener("load", addDelete, false);
else if (window.attachEvent) window.attachEvent("onload", addDelete);
}
function doTest() {
document.editform.wpTextbox1.value = "{{subst:test}}~~~~";
document.editform.wpSummary.value = "{{test}}";
document.editform.wpWatchthis.checked = false;
document.editform.submit();
}
function addTest() {
addTab("javascript:doTest()", "test", "ca-test", "test", "");
akeytt();
}
//alert(document.title);
if (document.title.indexOf(" editing") != -1 && document.title.indexOf("User talk:") != -1 ) {
if (window.addEventListener) window.addEventListener("load", addTest, false);
else if (window.attachEvent) window.attachEvent("onload", addTest);
}
// </nowiki></pre>