میڈیاویکی:Group-eliminator.js
یاددہانی: محفوظ کرنے کے بعد تازہ ترین تبدیلیوں کو دیکھنے کے لیے آپ کو اپنے براؤزر کا کیش صاف کرنا ہوگا۔
- فائرفاکس/ سفاری: جب Reload پر کلک کریں تو Shift دبا کر رکھیں، یا Ctrl-F5 یا Ctrl-R دبائیں (Mac پر R- )
- گوگل کروم: Ctrl-Shift-R دبائیں (Mac پر Shift-R-⌘)
- انٹرنیٹ ایکسپلورر: جب Refresh پر کلک کریں تو Ctrl یا Ctrl-F5 دبائیں
- اوپیرا: Tools → Preferences میں جائیں اور کیش صاف کریں
اس اسکرپٹ کی دستاویزی تفصیلات میڈیاویکی:Group-eliminator پر درج کی جا سکتی ہیں۔ نیز ایسا معلوم ہوتا ہے کہ اس اسکرپٹ کا ایک متعاقب .css صفحہ بھی میڈیاویکی:Group-eliminator.css پر موجود ہے۔ |
// <nowiki>
$(function () {
//can not block sysops and bureaucrats
$('#ooui-php-1').blur(function() {
var username = $('#ooui-php-1').val();
if (username) {
$.getJSON(mw.config.get("wgScriptPath") + "/api.php?format=json&action=query&list=users&usprop=groups&ususers=" + username)
.done(function(query) {
// When response arrives extract the information we need.
if (!query.query) {
return;
}
query = query.query;
try {
user = query.users[0];
var groups = (typeof user.groups == "object") ? user.groups : [];
if (groups.indexOf('bureaucrat') >= 0 || groups.indexOf('sysop') >= 0) {
$('#ooui-php-1').val('');
$('#input.ooui-php-1').val('');
$('#mwProtectExpirySelection-edit, #mwProtectExpirySelection-move, #mwStabilizeExpirySelection').val('')
$("div.oo-ui-widget-enabled,div.mw-widget-selectWithInputWidget,div.mw-widget-ExpiryWidget-relative").hide()
}
} catch (e) {
return; // Not much to do if the server is returning an error (e.g. if the username is malformed).
}
});
}
});
// sets default expiry to 1 week and adds a 3 days option
$('#mwProtectExpirySelection-edit, #mwProtectExpirySelection-move, #mwStabilizeExpirySelection').val('1 week').each(function () {
$(this).find('[value="1 week"]').before($("<option>", { value: "3 days", text: "3 days" }));
});
// removes self user talk edit option on block
$('body.mw-special-Block #mw-input-wpDisableUTEdit').parent().parent().hide();
if ($.inArray(mw.config.get('wgAction'), ['view', 'submit']) !== -1) {
$('#movepage button[type=submit]').click(function () {
if ($("input[name='wpLeaveRedirect']:checkbox").is(":checked") !== true) {
var OriginTitle=mw.config.get('wgTitle')
OriginTitle=OriginTitle.substring(12, OriginTitle.length)//اصل صفحہ
var PNamespace=document.getElementsByClassName("oo-ui-dropdownWidget-handle")[0].getElementsByClassName("oo-ui-labelElement-label")[0].innerText
if (PNamespace!=='(مرکزی)'){
PNamespace=PNamespace+':'
}else{
PNamespace=''
}
var TargetTitle=PNamespace+document.getElementsByClassName("oo-ui-inputWidget-input")[1].value
//ہدف صفحہ
var botpath='//tools.wmflabs.org/shuaib-bot/modifylink.php?title='+OriginTitle+'---'+TargetTitle+'---منتقلی بدون رجوع مکرر&user=صارف:' + mw.config.get('wgUserName')
alert(botpath)
console.log(botpath);
$.get(botpath)
};
});
}
});