MediaWiki:Wp/bgn/TobgnwikiPass.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// <nowiki> // DO NOT REMOVE THIS LINE EVER
// Author: User:Ebrahim
$(function () {
'use strict';
var enName = encodeURI(new mw.Uri().query.enName);
var form = $('form#editform');
form.append($('<input>', {
type: 'hidden',
name: 'wpExtraQueryRedirect',
value: 'withJS=MediaWiki:TobgnwikiFinal.js&enName=' + enName
}));
form.attr('action', form.attr('action') + '&' + 'withJS=MediaWiki:TobgnwikiPass.js&enName=' + enName);
if (mw.config.get('wgNamespaceNumber') === 0) {
$('<iframe>', {
src: "https://en.wikipedia.org/wiki/" + encodeURIComponent(enName),
style: "width: 100%; height: 400px;"
}).insertAfter('#content');
}
$('#wpSave').click(function () {
$('#wpTextbox1').val($('#wpTextbox1').val()
.replace('\n\n{{Wp/bgn/موضوع-خرد}}\n', '') //اصلاح نه بوتهئین تراشوان حذف بیت
.replace(/<!--[\s\S]*?-->/g, '') // ترجمه نه بوتهئین متن شه <!-- --> پاک بهینت
);
});
});