نکته: پس از انتشار ممکن است برای دیدن تغییرات نیاز باشد که حافظهٔ نهانی مرورگر خود را پاک کنید.
- فایرفاکس / سافاری: کلید Shift را نگه دارید و روی دکمهٔ Reload کلیک کنید، یا کلیدهای Ctrl-F5 یا Ctrl-R را با هم فشار دهید (در رایانههای اپل مکینتاش کلیدهای ⌘-R)
- گوگل کروم: کلیدهای Ctrl+Shift+R را با هم فشار دهید (در رایانههای اپل مکینتاش کلیدهای ⌘-Shift-R)
- Edge: کلید Ctrl را نگهدارید و روی دکمهٔ Refresh کلیک کنید، یا کلیدهای Ctrl-F5 را با هم فشار دهید
//Created by Yahya
//Please give feedback on [[User Talk:Yahya]]
//See installation procedure on [[User:Yahya/scrips/SNA]]
(function() {
$(document).ready(function() {
mw.loader.using(['mediawiki.util'], function() {
{
var L = mw.util.addPortletLink("p-personal", "javascript:void(0)", "+زیرصفحه", 'p-subpcr', 'ایجاد زیرصفحهٔ کاربری تازه', 'null', '#utcdate');
L.addEventListener("click", subpage);
var M = mw.util.addPortletLink("p-personal", "javascript:void(0)", "+مقاله", 'p-artcr', 'ایجاد مقالهٔ تازه', 'null', '#p-subpcr');
M.addEventListener("click", article);
var C = mw.util.addPortletLink("p-personal", "javascript:void(0)", "+رده", 'p-catcr', 'ایجاد ردهٔ تازه', 'null', '#p-artcr');
C.addEventListener("click", category);
var CD = mw.util.addPortletLink("p-personal", "javascript:void(0)", "+CD", 'p-cdcr', 'ایجاد الگوی داده کشور تازه', 'null', '#p-catcr');
CD.addEventListener("click", countryData);
return;
}
});
});
}());
function subpage() {
var user = mw.config.get("wgUserName");
var subp = prompt("عنوان زیرصفحه؟");
switch (subp) {
case null:
case undefined:
case '':
//Do nothing
break;
default:
{
window.open('/w/index.php?preload=Special:New_page&editintro=&title=کاربر:' + user + '/' + subp + '&action=edit', '_blank');
}
}
}
function article() {
var art = prompt("عنوان مقاله؟");
switch (art) {
case null:
case undefined:
case '':
//Do nothing
break;
default:
{
window.open('/w/index.php?title=' + art + '&action=edit', '_blank');
}
}
}
function category() {
var cat = prompt("عنوان رده؟");
switch (cat) {
case null:
case undefined:
case '':
//Do nothing
break;
default:
{
window.open('/w/index.php?title=' + ((cat.indexOf('رده:') > -1) ? '' : 'رده:') + cat + '&action=edit', '_blank');
}
}
}
function countryData() {
var cd = prompt("نام کشور؟");
switch (cd) {
case null:
case undefined:
case '':
//Do nothing
break;
default:
{
window.open('/w/index.php?title=الگو:Country_data_' + encodeURIComponent(cd) + '&action=edit&preload=' + encodeURIComponent('کاربر:Jeeputer/جا') + '&preloadparams%5B%5D=' + encodeURIComponent(mw.config.get('wgPageName').replace(/\_/g, ' ')) + '&preloadparams%5B%5D=' + encodeURIComponent(cd), '_blank' );
}
}
}