chore: rm console log
This commit is contained in:
@@ -1803,22 +1803,16 @@ class ClientSelectorGenerator {
|
|||||||
let elements = iframeDoc.elementsFromPoint(x, y) as HTMLElement[];
|
let elements = iframeDoc.elementsFromPoint(x, y) as HTMLElement[];
|
||||||
if (!elements.length) return null;
|
if (!elements.length) return null;
|
||||||
|
|
||||||
console.log("ALL ELEMENTS", elements);
|
|
||||||
|
|
||||||
const dialogElement = elements.find(
|
const dialogElement = elements.find(
|
||||||
(el) => el.getAttribute("role") === "dialog"
|
(el) => el.getAttribute("role") === "dialog"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dialogElement) {
|
if (dialogElement) {
|
||||||
console.log("FOUND DIALOG ELEMENT", dialogElement);
|
|
||||||
|
|
||||||
// Filter to keep only the dialog and its children
|
// Filter to keep only the dialog and its children
|
||||||
const dialogElements = elements.filter(
|
const dialogElements = elements.filter(
|
||||||
(el) => el === dialogElement || dialogElement.contains(el)
|
(el) => el === dialogElement || dialogElement.contains(el)
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("FILTERED DIALOG ELEMENTS", dialogElements);
|
|
||||||
|
|
||||||
// Get deepest element within the dialog
|
// Get deepest element within the dialog
|
||||||
const findDeepestInDialog = (
|
const findDeepestInDialog = (
|
||||||
elements: HTMLElement[]
|
elements: HTMLElement[]
|
||||||
@@ -1852,7 +1846,6 @@ class ClientSelectorGenerator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const deepestInDialog = findDeepestInDialog(dialogElements);
|
const deepestInDialog = findDeepestInDialog(dialogElements);
|
||||||
console.log("DEEPEST IN DIALOG", deepestInDialog);
|
|
||||||
return deepestInDialog;
|
return deepestInDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1874,13 +1867,11 @@ class ClientSelectorGenerator {
|
|||||||
(style.position === "fixed" || style.position === "absolute") &&
|
(style.position === "fixed" || style.position === "absolute") &&
|
||||||
zIndex > 50
|
zIndex > 50
|
||||||
) {
|
) {
|
||||||
console.log("FOUND POSITIONED ELEMENT", element);
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For SVG elements (like close buttons), prefer them if they're in the top elements
|
// For SVG elements (like close buttons), prefer them if they're in the top elements
|
||||||
if (element.tagName === "SVG" && i < 2) {
|
if (element.tagName === "SVG" && i < 2) {
|
||||||
console.log("FOUND SVG ELEMENT", element);
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1913,8 +1904,6 @@ class ClientSelectorGenerator {
|
|||||||
|
|
||||||
let deepestElement = findDeepestElement(elements);
|
let deepestElement = findDeepestElement(elements);
|
||||||
|
|
||||||
console.log("DEEPEST ELEMENT", deepestElement);
|
|
||||||
|
|
||||||
if (!deepestElement) return null;
|
if (!deepestElement) return null;
|
||||||
|
|
||||||
const traverseShadowDOM = (element: HTMLElement): HTMLElement => {
|
const traverseShadowDOM = (element: HTMLElement): HTMLElement => {
|
||||||
@@ -3133,13 +3122,6 @@ class ClientSelectorGenerator {
|
|||||||
childSelectors?: string[];
|
childSelectors?: string[];
|
||||||
} | null {
|
} | null {
|
||||||
try {
|
try {
|
||||||
console.log("🐛 DEBUG: generateDataForHighlighter called with:", {
|
|
||||||
coordinates,
|
|
||||||
getList: this.getList,
|
|
||||||
listSelector: this.listSelector,
|
|
||||||
isDOMMode,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Use instance variables instead of parameters
|
// Use instance variables instead of parameters
|
||||||
const rect = this.getRect(
|
const rect = this.getRect(
|
||||||
iframeDocument,
|
iframeDocument,
|
||||||
@@ -3161,11 +3143,6 @@ class ClientSelectorGenerator {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!rect || !elementInfo || !displaySelector) {
|
if (!rect || !elementInfo || !displaySelector) {
|
||||||
console.log("🐛 DEBUG: Missing basic data:", {
|
|
||||||
rect: !!rect,
|
|
||||||
elementInfo: !!elementInfo,
|
|
||||||
selectors: !!displaySelector,
|
|
||||||
});
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3183,24 +3160,12 @@ class ClientSelectorGenerator {
|
|||||||
|
|
||||||
if (this.getList === true) {
|
if (this.getList === true) {
|
||||||
if (this.listSelector !== "") {
|
if (this.listSelector !== "") {
|
||||||
console.log(
|
|
||||||
"🐛 DEBUG: Getting child selectors for:",
|
|
||||||
this.listSelector
|
|
||||||
);
|
|
||||||
const childSelectors = this.getChildSelectors(
|
const childSelectors = this.getChildSelectors(
|
||||||
iframeDocument,
|
iframeDocument,
|
||||||
this.listSelector
|
this.listSelector
|
||||||
);
|
);
|
||||||
console.log("🐛 DEBUG: Generated child selectors:", {
|
|
||||||
count: childSelectors.length,
|
|
||||||
selectors: childSelectors.slice(0, 10), // First 10
|
|
||||||
listSelector: this.listSelector,
|
|
||||||
});
|
|
||||||
return { ...highlighterData, childSelectors };
|
return { ...highlighterData, childSelectors };
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
|
||||||
"🐛 DEBUG: No listSelector set, returning without childSelectors"
|
|
||||||
);
|
|
||||||
return highlighterData;
|
return highlighterData;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3234,8 +3199,6 @@ class ClientSelectorGenerator {
|
|||||||
)
|
)
|
||||||
: this.getSelectors(iframeDocument, coordinates);
|
: this.getSelectors(iframeDocument, coordinates);
|
||||||
|
|
||||||
console.log("SELECTOR BASED ON CUSTOM ACTION", selectorBasedOnCustomAction);
|
|
||||||
|
|
||||||
if (this.paginationMode && selectorBasedOnCustomAction) {
|
if (this.paginationMode && selectorBasedOnCustomAction) {
|
||||||
// Chain selectors in specific priority order
|
// Chain selectors in specific priority order
|
||||||
const selectors = selectorBasedOnCustomAction;
|
const selectors = selectorBasedOnCustomAction;
|
||||||
|
|||||||
Reference in New Issue
Block a user