پرش به محتوا

مدیاویکی:Gadget-decodesummary.js: تفاوت میان نسخه‌ها

از دانشنامه علوم انسانی
imported>Ebrahim
بدون خلاصۀ ویرایش
imported>Ebrahim
بدون خلاصۀ ویرایش
خط ۱: خط ۱:
$(function () {
$(function () {
$('input#wpSummary, input#wpReason').bind('paste', function (e) {
$('input#wpSummary, input#wpReason, input#mwProtect-reason').bind('paste', function (e) {
var that = $(this);
var that = $(this);
setTimeout(function () {
setTimeout(function () {

نسخهٔ ۷ سپتامبر ۲۰۱۴، ساعت ۱۹:۳۴

$(function () {
	$('input#wpSummary, input#wpReason, input#mwProtect-reason').bind('paste', function (e) {
		var that = $(this);
		setTimeout(function () {
			that.val(decodeURI(
				that.val().replace(/%20/g, '‍‍‍')
			).replace(/‍‍‍/g, '%20'));
        }, 100);
    });
}());