MediaWiki:Gadget-rollbackconfirmable.js
Asani: Bayan wallafawa, zaku yi juyar da cache na browser din ku dan ganin sauye-sauye.
- Firefox / Safari: Rike Shift asanda kuke danna Reload, ko danna kodai Ctrl-F5 ko kuma Ctrl-R (⌘-R akan Mac)
- Google Chrome: Danna Ctrl-Shift-R (⌘-Shift-R akan Mac)
- Internet Explorer / Edge: Rike Ctrl asanda kuke danna Refresh, ko latsa Ctrl-F5
- Opera: Danna Ctrl-F5.
/**
* Prevent immediate rollback action with https://gerrit.wikimedia.org/r/90729 help
* Author: User:Ebraminio
*/
/*jslint browser: true, white: true*/
/*global $, mw*/
$.when($.ready, mw.loader.using('jquery.confirmable')).then(function () {
'use strict';
var rollbackLinks = $('.mw-rollback-link a');
if (rollbackLinks.length === 0) { return; }
mw.util.addCSS('.mw-rollback-link, .mw-rollback-link a { white-space: nowrap; display: inline-block; vertical-align: bottom; }');
rollbackLinks.each(function () {
var from = new mw.Uri(this.href).query.from;
if (!$(this).confirmable) { return; }
$(this).confirmable({
i18n: { confirm: 'واگردانی ویرایش ' + from + '؟' },
buttonCallback: function (button, which) {
if (which === 'no') {
// Remove misleading attributes
return button.attr({
title: null,
href: '#'
});
}
return button;
}
});
});
});