מדיה ויקי:Gadget-DeleteRequest.js: הבדלים בין גרסאות בדף
מראה
מ מגדר |
מאין תקציר עריכה |
||
| שורה 1: | שורה 1: | ||
/* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים | /* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים | ||
* נכתב על ידי [[משתמש:ערן]] | * נכתב על ידי [[משתמש:ערן]] | ||
* לא נראה שזה תקין ב-IE6 | |||
*/ | */ | ||
function addDeleteOption() { | function addDeleteOption() { | ||
ta['del'] = [ | ta['del'] = ["", 'מחיקת דף זה']; | ||
if (!document.getElementById) return; | if (!document.getElementById) return; | ||
var reqDel=wgPageName; | var reqDel = wgPageName; | ||
x = document.getElementById('ca-move'); | x = document.getElementById('ca-move'); | ||
if(!x) return; | if (!x) return; | ||
y = document.createElement('li'); | y = document.createElement('li'); | ||
y.id = 'ca-move'; | y.id = 'ca-move'; | ||
z = document.createElement('a'); | 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) { | if (x.children) { | ||
z.appendChild(document.createTextNode('מחיקה')); | z.appendChild(document.createTextNode('מחיקה')); | ||
גרסה מ־20:40, 15 בפברואר 2009
/* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
* נכתב על ידי [[משתמש:ערן]]
* לא נראה שזה תקין ב-IE6
*/
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);