משתמש:אורי ר./monobook.js

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

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

  • במוזילה, פיירפוקס או ספארי, לחצו על מקש ה־Shift בעת לחיצתכם על העלה מחדש (Reload), או הקישו Ctrl+Shift+R (או Cmd+Shift+R במקינטוש של אפל).
  • באינטרנט אקספלורר, לחצו על מקש ה־Ctrl בעת לחיצתכם על רענן (Refresh), או הקישו על Ctrl+F5.
  • ב־Konqueror, פשוט לחצו על העלה מחדש (Reload), או הקישו על F5.
  • באופרה, ייתכן שתצטרכו להשתמש בכלים (Tools) > העדפות (Preferences) כדי לנקות לחלוטין את זכרון המטמון.
/* תמונות ליד קישורים חיצוניים */
function externalLIcons(e) 
{
    e = (e) ? e : event;
    var links = document.getElementsByTagName("a");
    var i;
    for (i = 1; i <= links.length; i++)
    {
        if (links[i - 1].className == "external text")
        {
    var extrImg=document.createElement("img");
    if(links[i-1].href.match(".pdf")){
    extrImg.src= 'http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Icons-mini-file_acrobat.gif/15px-Icons-mini-file_acrobat.gif';
    } else if(links[i-1].href.match(/.(doc|rtf)/)){
    extrImg.src= 'http://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Noia_64_mimetypes_wordprocessing.png/16px-Noia_64_mimetypes_wordprocessing.png';
    } else {
    extrImg.src= 'http://upload.wikimedia.org/wikipedia/he/thumb/0/01/External2.png/10px-External2.png';
    }
         links[i-1].appendChild(extrImg);
        }
    }
}

addLoadEvent(externalLIcons);

/* פונקציה שמספקת תקציר עריכה אוטומטי כשעורכים גרסה ישנה. התקציר האוטומטי הוא "שחזור לגרסה 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);
}
}
addOnloadHook(oldVersEdit);

// פונקציה להוספת רשימת אזהרות כשעורכים דף שיחה של אנונימי
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].value + \' ~~\' + \'~~\';this.selectedIndex=0;">';
   warList += '<option value="" title="">בחרו מהרשימה כדי להוסיף</option>'
   warList += '<option title="אזהרה" value="{{אזהרה}}">אזהרה</option>'
   warList += '<option title="הבל" value="{{הבל}}">הבל</option>'
   warList += '<option title="הזמנה" value="{{הזמנה}}">הזמנה</option>'
   warList += '<option title="ניסויים" value="{{ניסויים}}">ניסויים</option>'
   warList += '<option title="תודה" value="{{תודה}}">תודה</option>'
   warList += '<option title="ויקיזציה" value="{{ויקיזציה}}">ויקיזציה</option>'
   warList += '<option title="לך" value="{{לך}}">לך</option>'
   warList += '<option title="תלונה" value="{{תלונה}}">תלונה</option>'
   warList += '<option title="טעות" value="{{טעות}}">טעות</option>'
   warList += '<option title="נייטרליות" value="{{נייטרליות}}">נייטרליות</option>'
   warList += '<option title="נחסמת" value="{{נחסמת}}">נחסמת</option>'
   warList += '<option title="מילון" value="{{מילון}}">מילון</option>'
   warList += '<option title="כבר קיים" value="{{כבר קיים}}">כבר קיים</option>'
   warList += '<option title="שגיאה" value="{{שגיאה}}">שגיאה</option>'
   warList += '<option title="העתקה" value="{{העתקה}}">העתקה</option>'
   warList += '<option title="פרסומת" value="{{פרסומת}}">פרסומת</option>'
   warList += '<option title="נמחק" value="{{נמחק}}">נמחק</option>'
   warList += '<option title="הסבר" value="{{הסבר}}">הסבר</option>'
   warList += '<option title="בוטל" value="{{בוטל}}">בוטל</option>'
   warList += '<option title="סגנון" value="{{סגנון}}">סגנון</option>'
   warList += '</select>'
   templatesList.innerHTML=warList+templatesList.innerHTML;
  }
 }
addLoadEvent(talkIPTool);