1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-28 11:00:38 +12:00

Element picker tweaks

- Indentation whitespace fixes.
- Use built-in getBoundingClientRect() function instead of self-made.
- Use built-in DOM API for manipulating the class attributes instead of
  altering the className property.
- Add pointer-events: none to the svgRoot when using
  document.elementFromPoint(), but if the browser (older Safari for
  example) doesn't take the pointer-events into account, then fall back to
  display: none.
- Initiate every part of the picker at the same time; when the message is
  received from the background. This way the selected element will have
  the red overlay immediately, instead of showing first the black overlay,
  then a few milliseconds later the red.
This commit is contained in:
Deathamns 2014-10-23 14:12:37 +02:00 committed by gorhill
parent c56d3ca717
commit 9313a7f16b

View file

@ -38,7 +38,7 @@ var messagingConnector = function(response) {
// Safari bug
// Deleting the response.requestId below (only in some cases, probably
// when frames are present on the page) will remove it from all the
// following messages too, however with the following line it won't.
// future messages too, however with the following line it won't.
vAPI.safari && console.log;
delete vAPI.messaging.listeners[response.requestId];