VK: Hide Typing

look @name

As of 2019-07-29. See the latest version.

// ==UserScript==
// @name           VK: Hide Typing
// @name:ru        ВК: Скрыть набор текста
// @description    look @name
// @description:ru Смотри @name:ru 
// @namespace      hidetyping.user.js
// @version        0.2
// @match          https://vk.com/*
// ==/UserScript==

(() => {
	const listener = () => {
		const { send } = XMLHttpRequest.prototype;

		XMLHttpRequest.prototype.send = function (data) {
			if (/typing/.test(data)) {
				this.abort();
			}

			send.call(this, data);
		};
	};

	const script = document.createElement('script');
	script.setAttribute('type', 'text/javascript');
	script.textContent = `(${listener.toString()})()`;
	document.head.append(script);
})();