مدیاویکی:Gadget-hidebotedits.js: تفاوت میان نسخهها
ظاهر
imported>Ebrahim صفحهای جدید حاوی «←jslint indent: 2: ←global mw, $: mw.hook('wikipage.content').add(function () { 'use strict'; if (mw.config.get('wgAction') !== 'hi...» ایجاد کرد |
imported>Ebrahim بدون خلاصۀ ویرایش |
||
| خط ۴: | خط ۴: | ||
'use strict'; | 'use strict'; | ||
if (mw.config.get('wgAction') !== 'history') { return; } | if (mw.config.get('wgAction') !== 'history') { return; } | ||
var hidedEdits = $('#pagehistory .history-user > a').filter('[href$="bot"], [href$="Bot"], [href$="BOT"]').parent().parent().hide(); | var hidedEdits = $('#pagehistory .history-user > a') | ||
.filter('[href$="bot"], [href$="Bot"], [href$="BOT"]').parent().parent() | |||
.has('.minoredit').hide(); | |||
$('<button>', { | $('<button>', { | ||
'text': 'نمایش/نهفتن ویرایش\u200cهای ربات' | 'text': 'نمایش/نهفتن ویرایش\u200cهای ربات' | ||
نسخهٔ ۳ نوامبر ۲۰۱۳، ساعت ۲۲:۲۵
/*jslint indent: 2*/
/*global mw, $*/
mw.hook('wikipage.content').add(function () {
'use strict';
if (mw.config.get('wgAction') !== 'history') { return; }
var hidedEdits = $('#pagehistory .history-user > a')
.filter('[href$="bot"], [href$="Bot"], [href$="BOT"]').parent().parent()
.has('.minoredit').hide();
$('<button>', {
'text': 'نمایش/نهفتن ویرایش\u200cهای ربات'
}).click(function (e) {
hidedEdits.toggle();
e.preventDefault();
}).insertAfter('.mw-history-compareselectedversions-button');
});