مدیاویکی:Common.js: تفاوت میان نسخه‌ها

بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۲۰: خط ۲۰:
   document.body.classList.add("mobile-search-enhanced");
   document.body.classList.add("mobile-search-enhanced");
}
}
//
mw.loader.using('ext.wikiEditor').then(function () {
$('#wpTextbox1').wikiEditor('addToToolbar', {
sections: {
advanced: {
type: 'toolbar',
label: 'ابزارهای پیشرفته'
}
},
groups: {
templates: {
label: 'الگوها'
}
},
tools: {
infobox: {
label: 'اینفوباکس',
type: 'button',
icon: 'https://upload.wikimedia.org/wikipedia/commons/5/5a/VisualEditor_-_Template.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{Infobox\n| نام = \n| تصویر = \n}}\n',
post: ''
}
}
},
ref: {
label: 'منبع',
type: 'button',
icon: 'https://upload.wikimedia.org/wikipedia/commons/9/9c/OOjs_UI_icon_reference.svg',
action: {
type: 'encapsulate',
options: {
pre: '<ref>',
post: '</ref>'
}
}
},
gallery: {
label: 'گالری تصاویر',
type: 'button',
action: {
type: 'encapsulate',
options: {
pre: '<gallery>\nFile:Example.jpg|توضیح\n</gallery>',
post: ''
}
}
},
category: {
label: 'دسته‌بندی',
type: 'button',
action: {
type: 'encapsulate',
options: {
pre: '[[رده:',
post: ']]'
}
}
}
}
});
});