mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
adjust notification bar for small/zoomed screens
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
sendResponse();
|
||||
return true;
|
||||
}
|
||||
else if (msg.command === 'adjustNotificationBar') {
|
||||
adjustBar(msg.data);
|
||||
sendResponse();
|
||||
return true;
|
||||
}
|
||||
else if (msg.command === 'pageDetails') {
|
||||
pageDetails.push(msg.data.details);
|
||||
watchForms(msg.data.forms);
|
||||
@@ -249,4 +254,20 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function adjustBar(data) {
|
||||
if (data.height !== 42) {
|
||||
var newHeight = data.height + 'px';
|
||||
doHeightAdjustment('bit-notification-bar-iframe', newHeight);
|
||||
doHeightAdjustment('bit-notification-bar', newHeight);
|
||||
doHeightAdjustment('bit-notification-bar-spacer', newHeight);
|
||||
}
|
||||
}
|
||||
|
||||
function doHeightAdjustment(elId, heightStyle) {
|
||||
var el = document.getElementById(elId);
|
||||
if (el) {
|
||||
el.style.height = heightStyle;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user