מדיה ויקי:Gadget-DeleteRequest.js
קפיצה לניווט
קפיצה לחיפוש
הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload), או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh), או ללחוץ על צירוף המקשים Ctrl-F5.
- אופרה: ללחוץ על Ctrl-F5.
/* הסקריפט מוסיף לשוניות "מחיקה", "הגנה" ו"חסימה" על מנת שאפשר יהיה לבקש מחיקת דפים, הגנת דפים וחסימת משתמשים באמצעות דף בקשות ממפעילים. */
function addExtraJS_Tabs()
{
function addTab ( modelTab, type, text, title, req, section )
{
var newtab = modelTab.cloneNode ( true );
newtab.id = "ca-js-" + type;
newtab.className = "";
var link = newtab.firstChild;
if ( link.nodeName != "A" ) return;
link.href = "#";
link.title = title;
link.onclick = function() {
var reason = prompt ( "סיבה לבקשת ה" + text );
if ( !reason ) return; // cancel the operation
window.location.href = "http://he.wikipedia.org/w/index.php?title=" + encodeURIComponent("ויקיפדיה:בקשות_ממפעילים") + "&action=edit§ion="
section + "&ExtraJSTabreq=" + type + "&target=" + encodeURIComponent(req) + "&reason=" + encodeURIComponent(reason);
}
if ( link.firstChild.nodeName == "SPAN" ) link.firstChild.firstChild.nodeValue = text;
else link.firstChild.nodeValue = text;
modelTab.parentNode.insertBefore ( newtab, skin == "vector" ? modelTab : modelTab.nextSibling );
return newtab;
}
var x = null;
var historyTab = document.getElementById("ca-history");
if ( historyTab )
{
var x = addTab ( historyTab , "delete", "מחיקה", "מחיקת דף זה",
( wgNamespaceNumber == 14 || wgNamespaceNumber == 6 ? ":" : "" ) + wgPageName, 1 );
x = addTab ( x, "protect", "הגנה", "הגנה על דף זה",
( wgNamespaceNumber == 14 || wgNamespaceNumber == 6 ? ":" : "" ) + wgPageName, 3 );
}
if ( document.getElementById("t-contributions") )
addTab ( x || document.getElementById("ca-addsection") || document.getElementById("ca-edit") || document.getElementById("ca-nstab-user"),
"block", "חסימה", "חסימת משתמש זה", wgTitle, 2 );
}
if ( /&ExtraJSTabreq=/.test(location.href) ) addOnloadHook ( function () {
if ( getParamValue("ExtraJSTabreq") == "block" )
{
document.getElementById("wpSummary").value += " [" + "[משתמש:" + getParamValue("target") + "]]" +
" ([" + "[שיחת משתמש:" + getParamValue("target") + "]])";
document.getElementById("wpTextbox1").value += "\n* {" + "{לחסום|" + getParamValue("target") + "}} - " + getParamValue("reason") + " ~~" + "~~";
}
else
{
document.getElementById("wpSummary").value += " [" + "[" + getParamValue("target") + "]]";
document.getElementById("wpTextbox1").value += "\n* [" + "[" + getParamValue("target") + "]] - " + getParamValue("reason") + " ~~" + "~~";
}
document.getElementById("wpSave").click();
});
if ( wgTitle != "בקשות ממפעילים" && wgNamespaceNumber >= 0 ) addOnloadHook ( addExtraJS_Tabs );