5

If someone messages me on Facebook while I'm reading in another tab, the Facebook title will keep flashing back and forth. It is distracting for me. I don't object to changing the title, I just prefer to make it static. Does anybody know how to disable this feature?

I found a question in Stack Overflow asking how to make it dynamic: How to create flashing page title effect like facebook?

  • Break the Facebook tab into its own window and minimise the window? – MrWhite Mar 11 '15 at 0:25
  • 1
    Not convenience. I'll return to it anyway, when I decide to do so. I just don't want it distracting me. – Ooker Mar 11 '15 at 0:33
2

I know, this is extremely annoying.

You can try this on Chrome. This worked for me (with a pinned tab), in February 2017.

Create folder somewhere on your hard drive and create these two files in it:

manifest.json

{
  "manifest_version": 2,
  "name": "Pinned Tab Flashing",
  "version": "1.0",
  "description": "Disable pinned tabs flashing",
  "content_scripts": [{
    "matches": ["https://www.messenger.com/*"],
    "js": ["content.js"]
  }]
}

content.js

function titleModified() {
  var text = document.getElementsByTagName('title')[0].text;
  if (text != 'Messenger') {
    document.getElementsByTagName('title')[0].text = 'Messenger';
  }
}

window.onload = function() {
  var titleEl = document.getElementsByTagName("title")[0];
  var docEl = document.documentElement;

  if (docEl && docEl.addEventListener) {
    docEl.addEventListener("DOMSubtreeModified", function(evt) {
      var t = evt.target;
      if (t === titleEl || (t.parentNode && t.parentNode === titleEl)) {
        titleModified();
      }
    }, false);
  } else {
    document.onpropertychange = function() {
      if (window.event.propertyName == "title") {
        titleModified();
      }
    };
  }
};

Navigate to chrome://extensions/, click on Load unpacked extension and choose the folder you created. Then refresh your Messenger page.

|improve this answer|||||
  • 1
    could this work on Firefox too? – Ooker Feb 25 '17 at 12:42
  • Yes most certainly. The code will likely work as-is, but you'll have to look up and follow how to make a Firefox extension. – Ola Vikholt Mar 6 '17 at 1:19
  • The content.js can be made as an userscript. How to make this works in Facebook.com too? – Ooker May 25 '17 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.