مدیاویکی:Common.js: تفاوت میان نسخهها
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۲۸۲: | خط ۲۸۲: | ||
$(createNavigationBarToggleButton); | $(createNavigationBarToggleButton); | ||
===Main Page layout fixes === | |||
<pre> */ | |||
* | |||
* | |||
/* | |||
* Description: Stay on the secure server as much as possible | |||
* Maintainers: [[User:TheDJ]] | |||
*/ | */ | ||
if ( | if (wgServer == 'https://secure.wikimedia.org') { | ||
importScript('MediaWiki:Common.js/secure.js'); | |||
} | } | ||
/*</pre> | |||
=== Hide some upload options === | |||
<pre> */ | |||
/** | |||
* Fill upload with preloadOnEmpty for all | |||
* 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. |