پرش به محتوا

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

از دانشنامه علوم انسانی
imported>Ebrahim
بدون خلاصۀ ویرایش
imported>Ebrahim
بدون خلاصۀ ویرایش
خط ۳: خط ۳:
var that = $(this);
var that = $(this);
setTimeout(function () {
setTimeout(function () {
that.val(decodeURI(that.val()));
that.val(decodeURI(
that.val().replace(/%20/g, '‍‍‍')
).replace(/‍‍‍/g, '%20'));
         }, 100);
         }, 100);
     });
     });
}());
}());

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

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