משתמש:חי/monobook.js
< משתמש:חי
הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
- אופרה: ללחוץ על Ctrl-F5.
importUserScript(14);
// פונקציה להוספת רשימת אזהרות כשעורכים דף שיחה של אנונימי
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 += '<option title="נמחק ניסויים">נמחק ניסויים</option>'
warList += '</select>'
templatesList.innerHTML=warList+templatesList.innerHTML;
}
}
addLoadEvent(talkIPTool);
/* A helper function to add a button to one of the toolbars in the interface.
From [[:en:User:Omegatron/monobook.js/addlink.js]] */
function addLink(where, url, name, id, title, key, after){
//* where is the id of the toolbar where the button should be added;
// i.e. one of "p-cactions", "p-personal", or "p-navigation".
//* url is the URL which will be called when the button is clicked.
// javascript: urls can be used to do more complex things.
//* name is what will appear as the name of the button.
//* id is the id of the button; it's best to define one.
// Use a prefix to make sure its unique. Optional.
//* title is the tooltip title that gives a longer description
// of the button; if you define a accesskey, mention it here. Optional.
//* key is the char you want for the accesskey. Optional.
//* after is the id of the button you want to follow this one. Optional.
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
if(after) {
tabs.insertBefore(li,document.getElementById(after));
} else {
tabs.appendChild(li);
}
if(id) {
if(key && title) { ta[id] = [key, title]; }
else if(key) { ta[id] = [key, '']; }
else if(title) { ta[id] = ['', title];}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
$(function () {
addLink('p-personal', "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=" + wgUserName + "&dbname=hewiki_p", 'editcount', 'pt-thiscont', 'עבור לרשימת התרומות של משתמש זה', '', '');
});
importUserScript(19);
importUserScript(20);
importUserScript(29);