Skip to content

Instantly share code, notes, and snippets.

@danielbuechele
Last active June 13, 2017 18:53
Show Gist options
  • Save danielbuechele/e394a0fc988fba1200e9 to your computer and use it in GitHub Desktop.
Save danielbuechele/e394a0fc988fba1200e9 to your computer and use it in GitHub Desktop.
Fluidapp Userstyle for Facebook Messenger
window.fluid.dockBadge = '';
var notify = true;
setInterval(updateDockBadge, 500);
function updateDockBadge() {
var count = document.querySelector(".pls._1r.fwn:not(.hidden_elem)");
if (count) {
if (notify) {
var title = document.querySelector('._kx ._l2 ._l1').textContent;
var text = document.querySelector('._kx ._l3').textContent;
window.webkitNotifications.createNotification('',title,text).show();
notify = false;
}
window.fluid.dockBadge = count.textContent.replace(/\D/g,'');
} else {
notify = true;
window.fluid.dockBadge = '';
}
}
#pagelet_bluebar, #pagelet_dock, #rightCol, #pagelet_sidebar, ._1s5 {display: none}
#globalContainer {
width: auto !important;
padding-right: 0 !important;
}
body {
overflow: hidden !important;
}
div._2nb {
right: 0;
position: absolute;
left: 298px;
width: auto !important;
}
div.uiScrollableArea, .uiScrollableAreaBody, #contentArea {
width: 100% !important;
}
div.wmMasterView {
width: 298px !important;
}
.MercuryThreadImage, ._2w7 {
border-radius: 999em;
overflow: hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment