לדלג לתוכן

משתמש:שומבלע/monobook.js

מתוך ויקיפדיה, האנציקלופדיה החופשית

הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.

  • פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
  • גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
  • אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
// פונקציה להוספת רשימת אזהרות כשעורכים דף שיחה של אנונימי
function talkIPTool()
{
  var title = (document.title.substr(0, document.title.lastIndexOf(" - ")));
  templatesList=document.getElementById('edit-templates');
  if(templatesList!=null && title.indexOf('.')!=title.lastIndexOf('.')){
   warList='אזהרות: <select onchange="document.editform.wpSummary.value+=this[selectedIndex].title; document.editform.wpTextbox1.value += \'{{ס:\' + this[selectedIndex].title + \'}} ~~\' + \'~~\';this.selectedIndex=0;">';
   warList += '<option title="">בחרו מהרשימה כדי להוסיף</option>'
   warList += '<option title="אזהרה">אזהרה</option>'
   warList += '<option title="הבל">הבל</option>'
   warList += '<option title="הזמנה">הזמנה</option>'
   warList += '<option title="ניסויים">ניסויים</option>'
   warList += '<option title="תודה">תודה</option>'
   warList += '<option title="ויקיזציה">ויקיזציה</option>'
   warList += '<option title="לך">לך</option>'
   warList += '<option title="תלונה">תלונה</option>'
   warList += '<option title="טעות">טעות</option>'
   warList += '<option title="נייטרליות">נייטרליות</option>'
   warList += '<option title="נחסמת">נחסמת</option>'
   warList += '<option title="מילון">מילון</option>'
   warList += '<option title="כבר קיים">כבר קיים</option>'
   warList += '<option title="שגיאה" >שגיאה</option>'
   warList += '<option title="העתקה">העתקה</option>'
   warList += '<option title="פרסומת">פרסומת</option>'
   warList += '<option title="נמחק">נמחק</option>'
   warList += '<option title="הסבר">הסבר</option>'
   warList += '<option title="בוטל">בוטל</option>'
   warList += '<option title="סגנון">סגנון</option>'
   warList += '</select>'
   templatesList.innerHTML=warList+templatesList.innerHTML;
  }
 }
addLoadEvent(talkIPTool);
/* פונקציה שמספקת תקציר עריכה אוטומטי כשעורכים גרסה ישנה. התקציר האוטומטי הוא "שחזור לגרסה x" */
function oldVersEdit(){
if(document.location.search.indexOf("&action=edit&oldid=") != -1){
document.editform.wpSummary.value="שחזור לגרסה "+ document.location.search.substring(document.location.search.indexOf("&oldid=")+7,document.location.search.length);
}
}
$(oldVersEdit);
/* פונקציה להוספת סרגל אותיות. נכתב ע"י [[משתמש:ערן]] ו[[משתמש:Effib]] */
function AlNevig()
{
 psearch = document.getElementById('p-search');
 if (psearch != null) {
  var cleaner = "<br style=\\'clear:both;\\' />";
  Nivut = '<div class="portlet">\n<h5><label>ניווט אלפביתי</label></h5>\n<div class="pBody"><a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/א" alt="א">א</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ב" alt="ב">ב</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ג" alt="ג">ג</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ד" alt="ד">ד</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ה" alt="ה">ה</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ו" alt="ו">ו</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ז" alt="ז">ז</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ח" alt="ח">ח</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ט" alt="ט">ט</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/י" alt="י">י</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/כ" alt="כ">כ</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ל" alt="ל">ל</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/מ" alt="מ">מ</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/נ" alt="נ">נ</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ס" alt="ס">ס</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ע" alt="ע">ע</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/פ" alt="פ">פ</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/צ" alt="צ">צ</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ק" alt="ק">ק</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ר" alt="ר">ר</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ש" alt="ש">ש</a> | <a href="http://he.wikipedia.org/wiki/מיוחד:Allpages/ת" alt="ת">ת</a>\n</div>\n</div>';
  psearch.innerHTML = psearch.innerHTML + cleaner + Nivut;
 }
}

addLoadEvent(AlNevig);
/**** move edit sections- taken from [[:de:MediaWiki:Monobook.js]] ****/
function moveEditsection() {
    if (typeof oldEditsectionLinks == 'undefined' || oldEditsectionLinks == false) {
        var spans = document.getElementsByTagName("span");
        for(var i = 0; i < spans.length; i++) {
            if(spans[i].className == "editsection") {
                spans[i].style.fontSize = "x-small";
                spans[i].style.fontWeight = "normal";
                spans[i].style.cssFloat = "none";
                spans[i].style.marginRight = "0px";
                spans[i].parentNode.appendChild(document.createTextNode(" "));
                spans[i].parentNode.appendChild(spans[i]);
            }
        }
    }
}
// onload
$(moveEditsection);
$(function () {
        addLink('p-personal', "/w/index.php?title=%D7%9E%D7%99%D7%95%D7%97%D7%93:Prefixindex&from=" + wgUserName + "&namespace=2", 'דפי משנה', 'pt-subpage', 'עבור לרשימת דפי משנה של דף המשתמש', '', '');
});