mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
Revert "skip vis checks for notification bar collect()"
This reverts commit 9f51f005b0.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
3. Unminify and format to meet Mozilla review requirements.
|
||||
*/
|
||||
|
||||
function collect(document, undefined, noVisibleChecks) {
|
||||
function collect(document, undefined) {
|
||||
var isFirefox = navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Gecko/') !== -1;
|
||||
|
||||
document.elementsByOPID = {};
|
||||
@@ -457,10 +457,6 @@
|
||||
|
||||
// is a dom element visible on screen?
|
||||
function isElementVisible(el) {
|
||||
if (noVisibleChecks) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var theEl = el;
|
||||
el = (el = el.ownerDocument) ? el.defaultView : {};
|
||||
|
||||
@@ -484,10 +480,6 @@
|
||||
|
||||
// is a dom element "viewable" on screen?
|
||||
function isElementViewable(el) {
|
||||
if (noVisibleChecks) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var theDoc = el.ownerDocument.documentElement,
|
||||
rect = el.getBoundingClientRect(),
|
||||
docScrollWidth = theDoc.scrollWidth,
|
||||
@@ -966,7 +958,7 @@
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||
if (msg.command === 'collectPageDetails') {
|
||||
var pageDetails = collect(document, msg.noVisibleChecks || false);
|
||||
var pageDetails = collect(document);
|
||||
var pageDetailsObj = JSON.parse(pageDetails);
|
||||
chrome.runtime.sendMessage({
|
||||
command: 'collectPageDetailsResponse',
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
function fill() {
|
||||
chrome.runtime.sendMessage({
|
||||
command: 'bgCollectPageDetails',
|
||||
sender: 'autofiller',
|
||||
noVisibleChecks: false
|
||||
sender: 'autofiller'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
if (!obj || !obj.disableAddLoginNotification) {
|
||||
chrome.runtime.sendMessage({
|
||||
command: 'bgCollectPageDetails',
|
||||
sender: 'notificationBar',
|
||||
noVisibleChecks: true
|
||||
sender: 'notificationBar'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user