מדיה ויקי:Common.js
מתוך ויקירפואה
הערה: לאחר השמירה, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload), או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אינטרנט אקספלורר: להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh), או ללחוץ על צירוף המקשים Ctrl-F5.
- אופרה: לפתוח תפריט ← הגדרות (במחשב מק: Opera ← העדפות) ואז ללחוץ על פרטיות ואבטחה ← מחק היסטוריית גלישה ← Cached images and files.
/* כל סקריפט JavaScript שנכתב כאן ירוץ עבור כל המשתמשים בכל טעינת עמוד */
/*importScript("MediaWiki:Navigationbar.js");*/
//adds print link
/*var printButton = $('"<li id="printTab"><span><a href="#" title="להדפסת הדף">הדפסה</a></span></li>').click(function(){
window.print();
});
$('#p-views ul').prepend ( printButton ) ;*/
$('.printfriendly a').on("click", function(){
window.print(); return false;
});
/* Google search */
/*$('#mw-searchButton').after($('<input type="button" class="searchButton" title="חיפוש טקסט זה בגוגל" value="חיפוש גוגל">').click(function(){
window.location.href = 'https://www.google.com/search?q='+encodeURI($('#searchInput').val())+'&domains=http://wikirefua.org.il&sitesearch=http://wikirefua.org.il&ie=utf-8&oe=utf-8';
}));*/
/* breakline in categories */
/*$(function(){
var catsToBreak = $('.catBreak').map(function(i,e){
return $(e).text();
});
$('.mw-normal-catlinks a').filter( function(i, e) { return $.inArray($(e).text(),catsToBreak)>-1 } )
.each( function(){
$(this).parent().next().css('border-right','none').before('<br>')
});
});*/
/* additional toolbar buttons */
if ( mw.user.options.get('usebetatoolbar')) {
mw.loader.using(['jquery.wikiEditor','jquery.wikiEditor.toolbar','ext.wikiEditor','ext.wikiEditor.toolbar'],function(){
$(function() {
// קבוצה חדשה בתפריט מתקדם:
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'groups': {
'more': {
'label': ""
}
}
} );
// טקסט ממורכז
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'group': 'more',
'tools': {
'center': {
label: 'טקסט ממורכז',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Gnome-format-justify-center.svg/22px-Gnome-format-justify-center.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '<center>',
peri: "טקסט ממורכז",
post: "</center>"
}
}
}
}
} );
// טקסט מיושר לשמאל
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'group': 'more',
'tools': {
'center': {
label: 'טקסט מיושר לשמאל',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Gnome-format-justify-left.svg/22px-Gnome-format-justify-left.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '<div class="mw-content-ltr">',
peri: "טקסט מיושר לשמאל",
post: "</div>"
}
}
}
}
} );
// הערה מוסתרת
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'group': 'more',
'tools': {
'hiddennote': {
label: 'הערה מוסתרת',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Gnome-document-new.svg/22px-Gnome-document-new.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
peri: "הערה מוסתרת",
post: " -->"
}
}
}
}
} );
// צבע גופן
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'main',
'group': 'format',
'tools': {
'colouredtext': {
label: 'טקסט צבוע',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/he/2/26/NewColorBtn.png',
action: {
type: 'encapsulate',
options: {
pre: '<span style="color: ColorName;">',
peri: "טקסט צבוע",
post: "</span>"
}
}
}
}
} );
});
});
}
//Loading dialog for wikitrufut links
$(function(){
if($('.wikitrufot-dialog-links a').length > 0) {
mw.loader.using('jquery.ui.dialog', function(){
$('.wikitrufot-dialog-links a').click(function(e){
var dest = $(this).attr('href');
$('<div style="text-align:center;" />').append($('<iframe style="width:1000px;height:640px;" />').attr("src", dest)).dialog({
width: '1050',
height: '700',
title: $(this).prop('title').substr(2),
buttons: {
"צפייה במסך מלא": function() {
location.href = dest;
}}
});
e.preventDefault();
})
});
}
});
$('.cf_mobile_btn').unbind().on('click', function(){ $(this).parent().find('.contact_form').show(); $(this).hide();$('#cf_mobile_btn_close').show(); })
$('#cf_mobile_btn_close').unbind().on('click', function(){ $(this).parent().parent().find('.contact_form').hide(); $('.cf_mobile_btn').hide(); })

כניסה
עקבו אחרינו בפייסבוק