Top Ad unit 728 × 90

Here’s how to enable custom reactions in Facebook Messenger right now

Facebook is known for testing new features with users all the time. Some are cool and useful, however, many are often held behind a barrier of exclusivity, with some people seemingly getting whatever the new feature is and many more not. One such feature is custom reactions, which Facebook said is coming to the Messenger platform soon. Message reactions are fun and useful ways to quickly communicate, but the ones that Facebook Messenger offers by default don’t cover all the bases. I discovered a way to enable them, and all you need is your computer, Tampermonkey, and a script that I wrote.

Enabling custom reactions in Facebook Messenger

First of all, you’re going to need to install Tampermonkey as a Chrome or Firefox extension. Tampermonkey is an extension that allows you to run “userscripts” on pages, which are custom JavaScript programs to modify pages, and we’re going to use it to enable custom reactions. Once you install Tampermonkey, click your extensions in the top right and select the Tampermonkey icon. You’ll be greeted with this screen.

Click “create a new script”.

Next, you’ll want to paste in all of the following code into the window that you’ve been brought into.

// ==UserScript==
// @name         Enable custom reacts
// @namespace    https://www.xda-developers.com
// @version      0.1
// @description  Enable custom reacts
// @author       Adam Conway
// @match        https://www.messenger.com/*
// @grant        none
// ==/UserScript==

(function() {
  'use strict';

  const heart = '\u2764';
  const clown = '\u{1F921}';

  const heartEncoded = encodeURIComponent(heart);
  const clownEncoded = encodeURIComponent(clown);

  const promptText = `React with:
1: ${heart} (Heart),
2: ${clown} (Clown)`;


  const oldOpen = XMLHttpRequest.prototype.open;

  XMLHttpRequest.prototype.open = function() {
      const query = arguments[1];

      // Catch heart react specifically
      if (query.includes('ADD_REACTION') && query.includes(heartEncoded)) {
      // Get replacement reaction
      const new_reaction = Number.parseInt(prompt(promptText, '2'));

      // Replacing queries
      if (1 === new_reaction) {
        arguments[1] = query.replace(heartEncoded, heartEncoded);
      } else if (2 === new_reaction) {
        arguments[1] = query.replace(heartEncoded, clown);
      }
    }

    // Send
    oldOpen.apply(this, arguments);
  }
})();

Tampermonkey facebook messenger script

Click File -> Save, and then reload Messenger’s Website on your computer. Make sure that your heart react is set to the default heart react, and not the purple heart react. If it worked, try to react to a message on Facebook with a heart and you’ll get this prompt at the top.

Type “2” and you should see that you reacted to the message with a clown face.

Clown emoji react on Facebook Messenger

Next, restart Facebook Messenger on your phone, and you should see the following when you try to react to a message.

And that’s it!

Let us know if this worked for you in the comments below, or if you’re one of the lucky ones to get custom reactions in Facebook Messenger already!

The post Here’s how to enable custom reactions in Facebook Messenger right now appeared first on xda-developers.



from xda-developers https://ift.tt/374DfVK
via IFTTT
Here’s how to enable custom reactions in Facebook Messenger right now Reviewed by site on 1:33 AM Rating: 5

No comments:

All Rights Reserved by developers forum © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Formulaire de contact

Name

Email *

Message *

Powered by Blogger.