|
|
خط ۲۸۲: |
خط ۲۸۲: |
| $(createNavigationBarToggleButton); | | $(createNavigationBarToggleButton); |
|
| |
|
| ===Main Page layout fixes ===
| |
| <pre> */
| |
|
| |
|
| | | /** Main Page layout fixes ********************************************************* |
| /*
| | * |
| * Description: Stay on the secure server as much as possible | | * Description: Adds an additional link to the complete list of languages available. |
| * Maintainers: [[User:TheDJ]] | | * Maintainers: [[User:AzaToth]], [[User:R. Koot]], [[User:Alex Smotrov]] |
| */ | | */ |
| if (wgServer == 'https://secure.wikimedia.org') { | | if (['صفحهٔ_اصلی', 'بحث:صفحه_اصلی'].indexOf(mw.config.get('wgPageName')) !== -1) { |
| importScript('MediaWiki:Common.js/secure.js'); | | $(function () { |
| | mw.util.addPortletLink('p-lang', '//meta.wikimedia.org/wiki/فهرست ویکیپدیاها', 'فهرست کامل', 'interwiki-completelist', 'فهرست کامل'); |
| | }); |
| } | | } |
|
| |
|
| /*</pre>
| |
| === Hide some upload options ===
| |
| <pre> */
| |
| /** | | /** |
| * Fill upload with preloadOnEmpty for all | | * WikiMiniAtlas |
| * Check if user is eligible to see some more advanced options on [[Wikipedia:Upload]]
| |
| * And redirect to [[Wikipedia:Upload]] if there was no &wpUploadDescription for not trusted user
| |
| **/
| |
| /*$(function () {
| |
| if (mw.config.get('wgPageName') === 'ویژه:بارگذاری_پرونده' && $('#wpUploadDescription').val() === '') {
| |
| if (location.href.indexOf('wpForReUpload') === -1) {
| |
| $('#wpUploadDescription').val($('#preloadOnEmpty').text());
| |
| }
| |
| $('#mw-upload-permitted p').each(function () {
| |
| this.innerHTML = this.innerHTML.replace(/pdf[,،、] /, '');
| |
| });
| |
| }
| |
| if (mw.config.get('wgUserGroups').indexOf('sysop') === -1 &&
| |
| mw.config.get('wgUserGroups').indexOf('autopatrol') === -1 &&
| |
| mw.config.get('wgUserGroups').indexOf('rollbacker') === -1 &&
| |
| mw.config.get('wgUserGroups').indexOf('patroller') === -1 &&
| |
| mw.config.get('wgUserEditCount') < 100) {
| |
| if (mw.config.get('wgPageName') === 'ویژه:بارگذاری_پرونده' && new mw.Uri().query.wpUploadDescription === undefined) {
| |
| location.href = mw.util.wikiGetlink('ویکیپدیا:بارگذاری');
| |
| }
| |
| } else {
| |
| if (mw.config.get('wgNamespaceNumber') === 4 && mw.config.get('wgAction') === 'view') {
| |
| $('.trustedUploader').show();
| |
| }
| |
| if (mw.config.get('wgNamespaceNumber') === 6 && mw.config.get('wgAction') === 'view') {
| |
| $('#mw-imagepage-reupload-link').show();
| |
| }
| |
| }
| |
| });*/
| |
| | |
| /*</pre>
| |
| ===WikiMiniAtlas ===
| |
| <pre> */
| |
| | |
| * | | * |
| * Description: WikiMiniAtlas is a popup click and drag world map. | | * Description: WikiMiniAtlas is a popup click and drag world map. |
| | |
| * This script causes all of our coordinate links to display the WikiMiniAtlas popup button. | | * This script causes all of our coordinate links to display the WikiMiniAtlas popup button. |
| * The script itself is located on meta because it is used by many projects. | | * The script itself is located on meta because it is used by many projects. |