$(document).ready(function()
{
if($("body.skin-monobook.skin--responsive").length === 1)
{
var theEye = new MutationObserver(function(recordedEvent)
{
if($(".mw-echo-ui-notificationBadgeButtonPopupWidget-popup .oo-ui-popupWidget-body").length > 0)
{
theEye.disconnect();
resizeNotificationDropdown();
}
});
theEye.observe(document,{"subtree":true,"childList":true});
}
function resizeNotificationDropdown()
{
var ceaselessWatcher = new MutationObserver(function(recordedEvent)
{
var windowWidth = $(window).width();
if(windowWidth < 535)
{
$(".oo-ui-popupWidget-anchor").css({"left":"auto","right":"22px"});
$(".mw-echo-ui-notificationBadgeButtonPopupWidget-popup").css({"left":"auto","right":"10px"});
var interiorWidth=windowWidth<520?""+(windowWidth-20)+"px":"500px";
$(".mw-echo-ui-notificationBadgeButtonPopupWidget-popup .oo-ui-popupWidget-popup").css("width",interiorWidth);
$(".mw-echo-ui-notificationBadgeButtonPopupWidget-popup .oo-ui-popupWidget-body").css("max-width",interiorWidth);
}
});
$(".mw-echo-ui-notificationBadgeButtonPopupWidget-popup .oo-ui-popupWidget-body").each(function(ind, el){ceaselessWatcher.observe(el,{"attributes":true})});
}
});