mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
finally, one that works
This commit is contained in:
parent
51bec01fea
commit
515f254a2d
1 changed files with 2 additions and 5 deletions
|
|
@ -766,11 +766,8 @@ var startPicker = function() {
|
|||
|
||||
svgRoot = document.createElementNS(svgns, 'svg');
|
||||
svgRoot.innerHTML = '<path /><path />';
|
||||
var nullRect = { left: 0, top: 0, width: 0, height: 0 };
|
||||
var htmlRect = document.documentElement ? document.documentElement.getBoundingClientRect() : nullRect;
|
||||
var bodyRect = document.body ? document.body.getBoundingClientRect() : nullRect;
|
||||
var svgWidth = Math.max(htmlRect.width, bodyRect.width);
|
||||
var svgHeight = Math.max(htmlRect.height, bodyRect.height);
|
||||
var svgWidth = document.documentElement.scrollWidth;
|
||||
var svgHeight = document.documentElement.scrollHeight;
|
||||
svgRoot.setAttribute('x', 0);
|
||||
svgRoot.setAttribute('y', 0);
|
||||
svgRoot.setAttribute('width', svgWidth);
|
||||
|
|
|
|||
Loading…
Reference in a new issue