Created
October 14, 2015 02:50
-
-
Save s-zeid/33e13adcd0157393394c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name messenger.com - No title blinking | |
// @namespace | |
// @description Disables page title blinking on messenger.com | |
// @include https://www.messenger.com/t/* | |
// @copyright Scott Zeid | |
// @version 1.0 | |
// @grant unsafeWindow | |
// ==/UserScript== | |
//////////////////////////////////////////////////////////////////////////////// | |
function placebo() {}; | |
var interval = setInterval(function() { | |
var require = unsafeWindow.eval("require"); | |
if (require) { | |
var dt = require("DocumentTitle"); | |
if (dt) { | |
if (unsafeWindow.eval("require('DocumentTitle').blink.name") == "placebo") { | |
clearInterval(interval); | |
window.console.log("replaced DocumentTitle.blink()"); | |
} | |
dt.blink = placebo; | |
} | |
} | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment