-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.js
37 lines (31 loc) · 1.06 KB
/
content.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const hideXrayQuickView = () => {
const xRayQuickViewEls = document.querySelectorAll(".xrayQuickView");
xRayQuickViewEls.forEach((xRayQuickViewEl) => {
if (xRayQuickViewEl.style.display !== "none") {
xRayQuickViewEl.style.display = "none";
}
});
const overlayContainerFirstDivChildEls = document.querySelectorAll(
'[class*="-overlays-container"] > div'
);
overlayContainerFirstDivChildEls.forEach(
(overlayContainerFirstDivChildEl) => {
if (overlayContainerFirstDivChildEl.style.background !== "none") {
overlayContainerFirstDivChildEl.style.background = "none";
}
}
);
const captionsOverlayEls = document.querySelectorAll(
'[class*="-captions-overlay"]'
);
captionsOverlayEls.forEach((captionsOverlayEl) => {
if (captionsOverlayEl.style.opacity !== "1") {
captionsOverlayEl.style.opacity = "1";
}
});
};
const observer = new MutationObserver(hideXrayQuickView);
window.onload = function () {
const config = { childList: true, subtree: true };
observer.observe(document.body, config);
};