לדלג לתוכן

מדיה ויקי:Gadget-DeleteRequest.js: הבדלים בין גרסאות בדף

מתוך צפונות ויקי
מ יצירה
 
מ כתבתי במקור לאחותי (משתמש:נטע/monobook.js)
שורה 1: שורה 1:
/* הסריפט מוסיף לשונית "מחק" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
/* הסריפט מוסיף לשונית "מחק" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
  * לא ברור מי כתב את הסקריפט. יש סיכוי טוב שמדובר בחלק מסדרת "Revert tools by Lorian".
  * נכתב על ידי [[משתמש:ערן]]
  */
  */



גרסה מ־19:40, 26 בדצמבר 2008

/* הסריפט מוסיף לשונית "מחק" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
 * נכתב על ידי [[משתמש:ערן]]
 */

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&section=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);