מדיה ויקי:Gadget-DeleteRequest.js: הבדלים בין גרסאות בדף
מראה
מ כתבתי במקור לאחותי (משתמש:נטע/monobook.js) |
מ מגדר |
||
| שורה 1: | שורה 1: | ||
/* הסריפט מוסיף לשונית " | /* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים | ||
* נכתב על ידי [[משתמש:ערן]] | * נכתב על ידי [[משתמש:ערן]] | ||
*/ | */ | ||
function addDeleteOption() { | function addDeleteOption() { | ||
ta['del'] = ['', ' | ta['del'] = ['', 'מחיקת דף זה']; | ||
if (!document.getElementById) return; | if (!document.getElementById) return; | ||
var reqDel=wgPageName; | var reqDel=wgPageName; | ||
| שורה 14: | שורה 14: | ||
z.href = 'http://he.wikipedia.org/w/index.php?title=ויקיפדיה:בקשות_ממפעילים&action=edit§ion=1&pleasedelete=yes&pagefordel='+reqDel; | z.href = 'http://he.wikipedia.org/w/index.php?title=ויקיפדיה:בקשות_ממפעילים&action=edit§ion=1&pleasedelete=yes&pagefordel='+reqDel; | ||
if (x.children) { | if (x.children) { | ||
z.appendChild(document.createTextNode(' | z.appendChild(document.createTextNode('מחיקה')); | ||
y.appendChild(z); | y.appendChild(z); | ||
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling); | document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling); | ||
} else { | } else { | ||
z.appendChild(document.createTextNode(' | z.appendChild(document.createTextNode('מחיקה')); | ||
y.appendChild(z); | y.appendChild(z); | ||
document.getElementById('p-cactions').childNodes[3].insertBefore(y,null); | document.getElementById('p-cactions').childNodes[3].insertBefore(y,null); | ||
גרסה מ־20:59, 1 בינואר 2009
/* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
* נכתב על ידי [[משתמש:ערן]]
*/
function addDeleteOption() {
ta['del'] = ['', 'מחיקת דף זה'];
if (!document.getElementById) return;
var reqDel=wgPageName;
x = document.getElementById('ca-move');
if(!x) return;
y = document.createElement('li');
y.id = 'ca-move';
z = document.createElement('a');
z.href = 'http://he.wikipedia.org/w/index.php?title=ויקיפדיה:בקשות_ממפעילים&action=edit§ion=1&pleasedelete=yes&pagefordel='+reqDel;
if (x.children) {
z.appendChild(document.createTextNode('מחיקה'));
y.appendChild(z);
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling);
} else {
z.appendChild(document.createTextNode('מחיקה'));
y.appendChild(z);
document.getElementById('p-cactions').childNodes[3].insertBefore(y,null);
}
}
addOnloadHook(function (){
if(location.href.match(/pleasedelete=yes/)) {
txtLoc=location.href;
reqDel=decodeURI(txtLoc.substring(txtLoc.indexOf('pagefordel=')+11,txtLoc.length));
document.getElementById('wpSummary').value = '[[' + reqDel + ']]';
document.getElementById('wpTextbox1').value = document.getElementById('wpTextbox1').value + '\n*[['+reqDel+']] ~~'+'~~';
document.getElementById('editform').submit();
}
});
addOnloadHook(addDeleteOption);