I am able to replace the mouse cursor in gmail following the solution in stack overflow.
This same solution works in maps like google maps.
However, it seems not to work in maps that have the cursor style within <div> ... </div>.
An example of those map is this one.
I tried to create a new div element (similar to style) and append it, but still it does not work.
// Gmail
var styleA = document.createElement('style');
styleA.innerHTML = "[style*='openhand.cur']{ cursor: grab !important; }[style*='closedhand.cur']{ cursor: grabbing !important; }";
// Google Maps
var styleB = document.createElement('style');
styleB.innerHTML = "[style*='openhand_8_8.cur']{ cursor: grab !important; }[style*='closedhand_8_8.cur']{ cursor: grabbing !important; }";
// Apply new styles defined above
document.head.appendChild(styleA);
document.head.appendChild(styleB);
The style that I want to override is the following one:
<div style="position: absolute; z-index: 0; left: 0px; top: 0px; height: 100%; width: 100%; padding: 0px; border-width: 0px; margin: 0px; cursor: url("https://maps.gstatic.com/mapfiles/openhand_8_8.cur"), default; touch-action: pan-x pan-y;">
And the JS selector seems to be the following:
document.querySelector("#map > div > div.gm-style > div:nth-child(1)")
What is the correct approach?