NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Press like to pay respect
// @version 1.0
// @description Replaces the "like" reaction with an "F" reaction
// @author Jakub Dranczewski
// @copyright 2021, jdranczewski (https://openuserjs.org/users/jdranczewski)
// @license MIT
// @match https://www.messenger.com/*
// @grant none
// ==/UserScript==
'use strict';
(function () {
WebSocket.prototype._send = WebSocket.prototype.send;
WebSocket.prototype.send = function (data) {
this._send(data);
this.send = function (data) {
var decoded = String.fromCharCode(...new Uint8Array(data));
var escaped = encodeURIComponent(decoded).replace("%C3%B0%C2%9F%C2%91%C2%8D", "%C3%B0%C2%9F%C2%87%C2%AB");
var back = decodeURIComponent(escaped);
var encoded = Uint8Array.from([...back].map(ch => ch.charCodeAt())).buffer;
this._send(encoded);
};
};
})();