get rid of cursor highlighting

This commit is contained in:
oneflux 2025-04-21 11:15:04 -07:00
parent 52a82add9b
commit e155da8276

View file

@ -28,38 +28,6 @@ index 1cfa4b8497..bdf8d7202e 100644
// When the fingerprinting resistance is enabled, making sure that we don't
// have a maximum window to interfere with generating rounded window dimensions.
document.documentElement.setAttribute("sizemode", "normal");
@@ -345,6 +371,31 @@ var gBrowserInit = {
}
}
+ if (ChromeUtils.camouGetBool("showcursor", true)) {
+ let cursorFollower = document.createElement("div");
+ cursorFollower.id = "cursor-highlighter";
+ cursorFollower.style.cssText = `
+ position: fixed;
+ width: 10px;
+ height: 10px;
+ background-color: rgba(255,105,105,0.8);
+ border-radius: 50%;
+ pointer-events: none;
+ z-index: 2147483647;
+ transform: translate(-50%, -50%);
+ box-shadow:
+ 0 0 0 5px rgba(255,105,105,0.5),
+ 0 0 0 10px rgba(255,105,105,0.3),
+ 0 0 0 15px rgba(255,105,105,0.1);
+ `;
+ document.documentElement.appendChild(cursorFollower);
+
+ window.addEventListener('mousemove', e => {
+ cursorFollower.style.left = `${e.clientX}px`;
+ cursorFollower.style.top = `${e.clientY}px`;
+ });
+ }
+
// Wait until chrome is painted before executing code not critical to making the window visible
this._boundDelayedStartup = this._delayedStartup.bind(this);
window.addEventListener("MozAfterPaint", this._boundDelayedStartup);
@@ -366,9 +417,152 @@ var gBrowserInit = {
)?.removeAttribute("key");
}