מדיה ויקי:Gadget-DeleteRequest.js
קפיצה לניווט
קפיצה לחיפוש
הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload), או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh), או ללחוץ על צירוף המקשים Ctrl-F5.
- אופרה: ללחוץ על Ctrl-F5.
/* הסריפט מוסיף לשונית "מחיקה" על מנת שאפשר יהיה לבקש מחיקת דפים באמצעות דף בקשות ממפעילים
* נכתב על ידי [[משתמש:ערן]]
*/
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);